bug-gnulib
[Top][All Lists]
Advanced

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

Re: manywarnings and -f options


From: Bruno Haible
Subject: Re: manywarnings and -f options
Date: Sat, 3 Dec 2011 12:40:22 +0100
User-agent: KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; )

Eric Blake wrote:
> > Should gl_MANYWARN_ALL_GCC be adding some gcc -f options?  For example,
> > at least gcc 4.3.4 -Wdisabled-optimization would emit a warning that
> > several other -W warnings are useless without -funit-at-a-time also in
> > place (see coreutils commit 5e361387d).  Also, according to 'info gcc,
> > -Wsuggest-attribute=pure only works if -fipa-pure-const is turned on
> > (true by default for -O compilation, but apparently the -W option can
> > also catch a few cases even without -O if -fipa-pure-const is manually
> > turned on).

-funit-at-a-time is an option which changes the code generation. IMO
it should not be enabled by a warnings module. For the same reason,
-Wdisabled-optimization is useless for our purposes - it is useful
for people who want maximum optimization, but the Autoconf default
is -O2 (for a good reason: Avoid less reliable optimizations).

So, treat -Wdisabled-optimization like -Wno-unsuffixed-float-constants.

> I also meant to add that -fdiagnostics-show-option is a must for
> determining which warnings are firing, when deciding which warnings to
> avoid.  Having these -f options added by default instead of making each
> client add them would make maintenance easier.

This option influences diagnostics, so IMO it makes sense to add it
whenever the compiler supports it.

Bruno
-- 
In memoriam Rudolf Slánský <http://en.wikipedia.org/wiki/Rudolf_Slánský>



reply via email to

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