bug-gnulib
[Top][All Lists]
Advanced

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

Re: manywarnings and -f options


From: Simon Josefsson
Subject: Re: manywarnings and -f options
Date: Sat, 03 Dec 2011 17:00:35 +0100
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.91 (gnu/linux)

Eric Blake <address@hidden> writes:

> On 12/02/2011 11:05 AM, 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).
>
> 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.

I already add -fdiagnostics-show-option to all my projects, so it seems
like a good idea to add to manywarnings.m4.

What does -funit-at-a-time really do?  My gcc 4.4 manual says:

`-funit-at-a-time'
     This option is left for compatibility reasons. `-funit-at-a-time'
     has no effect, while `-fno-unit-at-a-time' implies
     `-fno-toplevel-reorder' and `-fno-section-anchors'.

     Enabled by default.

The manual for -ipa-pure-const says:

`-fipa-pure-const'
     Discover which functions are pure or constant.  Enabled by default
     at `-O' and higher.

That seems harmless and as far I understand would not modify code
generation.

Considering this, I think that one could say generally that any -f*
parameter that does not modify code generation and may lead to more
warnings being emited are appropriate in manywarnings.m4.

/Simon



reply via email to

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