bug-gnulib
[Top][All Lists]
Advanced

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

Re: Removing -Wunsuffixed-float-constants, -Wdouble-promotion, -Wformat-


From: Jim Meyering
Subject: Re: Removing -Wunsuffixed-float-constants, -Wdouble-promotion, -Wformat-zero-length
Date: Wed, 30 Nov 2011 12:18:28 +0100

Simon Josefsson wrote:
> Jim Meyering <address@hidden> writes:
>
>> Instead, how about automating the extraction of the list of
>> warnings from gcc sources or from some web page?  Maybe you've
>> already done something like that?
>> Then we could add a rule to gnulib's Makefile that would ensure
>> our list is up to date and run it periodically (albeit manually).
>
> This is unfortunately a big mess and I do it manually.  As a result of
> doing it manually, I'm pretty sure some warnings are missing and some
> are repeated (due to being implied by other flags).  The problems
> include:
>
> 1) The gcc manual doesn't list all warning flags.

Automating it (even if not perfect) should be better than relying
on a manual and tedious (and thus infrequently done) task whose results
would otherwise tend to be out of date.

> 2) The gcc --help=warnings doesn't list all warning flags, although it
>    is a different subset than 1).
>
> 3) Several of the warnings mentioned by gcc --help=warnings does not
>    apply to C.

Yes, I noticed a few C++-only warnings.
These can be removed via a hard-coded list that we'd have to
keep up to date.  Shouldn't be much work.

> 4) Some warning flags imply other flags, which complicate things.
>    Should the redundant flag be removed or not?  It is made even more
>    complicated since this may change between gcc versions.
>
> I think there were other problems as well.  As a result, I gave up
> trying to automate it and did it manually initially just to get some
> warnings enabled.
>
> It would be nice to automate this.  I'm not sure whether to use the
> manual or the source code as the canonical source, although I lean
> towards using the source code.  I'm not sure how easy it would be to get
> a list though, I recall that warnings were not handled uniformly within
> gcc sources.

gcc --help=warnings output is easy to get and parse,
so it seems like a good starting point.



reply via email to

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