[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Disable -Werror when error attribute generates warnings

From: Colin Watson
Subject: Re: Disable -Werror when error attribute generates warnings
Date: Sun, 3 Jan 2010 21:48:53 +0000
User-agent: Mutt/1.5.18 (2008-05-17)

On Sat, Jan 02, 2010 at 07:21:21PM +0100, Vladimir 'φ-coder/phcoder' Serbinenko 
> Colin Watson wrote:
> > Instead of this, why not only use the attribute if it's available? I
> > couldn't find an entry about it in GCC's human-readable change
> > summaries, but support was committed on 2007-09-23 so I think it's
> > available from GCC 4.3.
> Why not have check specifically if this attribute is
> available and use it only if it is?

Perhaps it's a style thing; for some reason I've always preferred this
approach, even though normally I would advocate doing feature tests at
configure time rather than version tests at compile time. My preference
may be because __attribute__ is GCC-specific anyway, and there's no
guarantee that another compiler would implement the same attribute names
in the same way if they happened to use them, so it's better to be quite
explicit that this is specific to appropriate versions of GCC.

Colin Watson                                       address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]