|
From: | Simon Josefsson |
Subject: | Re: Removing -Wunsuffixed-float-constants, -Wdouble-promotion, -Wformat-zero-length |
Date: | Wed, 30 Nov 2011 12:21:35 +0100 |
User-agent: | Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.91 (gnu/linux) |
Jim Meyering <address@hidden> writes: > Paul Eggert wrote: >> On 11/30/11 02:25, Jim Meyering wrote: >>> how about automating the extraction of the list of >>> warnings from gcc sources or from some web page >> >> Or perhaps extract it from the gcc executable >> itself? Then you'd get all the warnings that the >> current GCC supports. > > Hah! > > I didn't know about --help=warnings. > That looks perfect. > > For a quick and dirty comparison, I did this: > (using gcc 4.7.0 20111124) > > diff -u \ > <(sed -n 's/^ *\(-[^ ]*\) .*/\1/p' /gnulib/m4/manywarnings.m4 |sort) \ > <(gcc --help=warnings|sed -n 's/^ \(-[^ ]*\) .*/\1/p' |sort) > > which shows at least one false positive (i.e. -Wformat=2 vs -Wformat=) > and many new warnings: Many of the new ones you list are for non-C. The -Wformat=2 should be correct, I believe the gcc --help=warnings output is incorrect? -Wformat is implied by -Wall but -Wformat=2 adds more. The --all-warnings and --extra-warnings are interesting, they were not present when manywarnings.m4 was created. I wonder how they work. /Simon
[Prev in Thread] | Current Thread | [Next in Thread] |