[Top][All Lists]
[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:09:24 +0100 |
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:
--- /proc/self/fd/11 2011-11-30 12:07:49.747440364 +0100
+++ /proc/self/fd/12 2011-11-30 12:07:49.747440364 +0100
@@ -1,79 +1,173 @@
+--all-warnings
+--extra-warnings
-W
-Wabi
+-Waddress
-Waggregate-return
+-Waliasing
+-Walign-commons
-Wall
+-Wampersand
+-Warray-bounds
+-Warray-temporaries
+-Wassign-intercept
-Wattributes
-Wbad-function-cast
-Wbuiltin-macro-redefined
-Wc++-compat
+-Wc++0x-compat
+-Wc++11-compat
-Wcast-align
-Wcast-qual
+-Wchar-subscripts
+-Wcharacter-truncation
+-Wclobbered
+-Wcomment
+-Wcomments
-Wconversion
+-Wconversion-extra
+-Wconversion-null
-Wcoverage-mismatch
-Wcpp
+-Wctor-dtor-privacy
-Wdeclaration-after-statement
+-Wdelete-non-virtual-dtor
-Wdeprecated
-Wdeprecated-declarations
-Wdisabled-optimization
-Wdiv-by-zero
-Wdouble-promotion
+-Weffc++
+-Wempty-body
-Wendif-labels
+-Wenum-compare
+-Werror-implicit-function-declaration
-Wextra
-Wfloat-equal
+-Wformat
-Wformat-contains-nul
-Wformat-extra-args
-Wformat-nonliteral
-Wformat-security
-Wformat-y2k
-Wformat-zero-length
--Wformat=2
+-Wformat=
+-Wfree-nonheap-object
+-Wfunction-elimination
+-Wignored-qualifiers
+-Wimplicit
+-Wimplicit-function-declaration
+-Wimplicit-int
+-Wimplicit-interface
+-Wimplicit-procedure
-Winit-self
-Winline
+-Wint-to-pointer-cast
+-Wintrinsic-shadow
+-Wintrinsics-std
+-Winvalid-memory-model
+-Winvalid-offsetof
-Winvalid-pch
+-Wjump-misses-init
+-Wlarger-than-
+-Wlarger-than=<number>
+-Wline-truncation
-Wlogical-op
-Wlong-long
+-Wmain
+-Wmaybe-uninitialized
+-Wmissing-braces
-Wmissing-declarations
+-Wmissing-field-initializers
-Wmissing-format-attribute
-Wmissing-include-dirs
-Wmissing-noreturn
+-Wmissing-parameter-type
-Wmissing-prototypes
-Wmudflap
-Wmultichar
--Wmultichar
+-Wnarrowing
-Wnested-externs
--Wnormalized=nfc
+-Wnoexcept
+-Wnon-template-friend
+-Wnon-virtual-dtor
+-Wnonnull
+-Wnormalized=<id|nfc|nfkc>
+-Wold-style-cast
+-Wold-style-declaration
-Wold-style-definition
-Woverflow
-Woverlength-strings
+-Woverloaded-virtual
+-Woverride-init
-Wpacked
-Wpacked-bitfield-compat
-Wpadded
+-Wparentheses
+-Wpmf-conversions
-Wpointer-arith
+-Wpointer-sign
-Wpointer-to-int-cast
-Wpragmas
+-Wproperty-assign-default
+-Wprotocol
+-Wreal-q-constant
-Wredundant-decls
+-Wreorder
+-Wreturn-type
+-Wselector
+-Wsequence-point
-Wshadow
--Wsign-conversion
+-Wsign-compare
+-Wsign-promo
-Wstack-protector
+-Wstack-usage=
-Wstrict-aliasing
+-Wstrict-aliasing=
+-Wstrict-null-sentinel
-Wstrict-overflow
+-Wstrict-overflow=
-Wstrict-prototypes
+-Wstrict-selector-match
-Wsuggest-attribute=const
-Wsuggest-attribute=noreturn
-Wsuggest-attribute=pure
+-Wsurprising
+-Wswitch
-Wswitch-default
-Wswitch-enum
-Wsync-nand
+-Wsynth
-Wsystem-headers
+-Wtabs
-Wtraditional
-Wtraditional-conversion
-Wtrampolines
+-Wtrigraphs
+-Wtype-limits
+-Wundeclared-selector
-Wundef
+-Wunderflow
+-Wuninitialized
-Wunknown-pragmas
--Wunreachable-code
-Wunsafe-loop-optimizations
+-Wunsuffixed-float-constants
-Wunused
+-Wunused-but-set-parameter
+-Wunused-but-set-variable
+-Wunused-dummy-argument
+-Wunused-function
+-Wunused-label
+-Wunused-local-typedefs
-Wunused-macros
+-Wunused-parameter
+-Wunused-result
+-Wunused-value
+-Wunused-variable
+-Wvariadic-macros
+-Wvector-operation-performance
-Wvla
-Wvolatile-register-var
-Wwrite-strings
+-Wzero-as-null-pointer-constant
+-frequire-return-statement
- Re: Removing -Wunsuffixed-float-constants, -Wdouble-promotion, -Wformat-zero-length, (continued)
Re: Removing -Wunsuffixed-float-constants, -Wdouble-promotion, -Wformat-zero-length, Eric Blake, 2011/11/29
- Re: Removing -Wunsuffixed-float-constants, -Wdouble-promotion, -Wformat-zero-length, Jim Meyering, 2011/11/29
- Re: Removing -Wunsuffixed-float-constants, -Wdouble-promotion, -Wformat-zero-length, Eric Blake, 2011/11/29
- Re: Removing -Wunsuffixed-float-constants, -Wdouble-promotion, -Wformat-zero-length, Eric Blake, 2011/11/29
- Re: Removing -Wunsuffixed-float-constants, -Wdouble-promotion, -Wformat-zero-length, Simon Josefsson, 2011/11/30
- Re: Removing -Wunsuffixed-float-constants, -Wdouble-promotion, -Wformat-zero-length, Jim Meyering, 2011/11/30
- Re: Removing -Wunsuffixed-float-constants, -Wdouble-promotion, -Wformat-zero-length, Jim Meyering, 2011/11/30
- Re: Removing -Wunsuffixed-float-constants, -Wdouble-promotion, -Wformat-zero-length, Paul Eggert, 2011/11/30
- Re: Removing -Wunsuffixed-float-constants, -Wdouble-promotion, -Wformat-zero-length,
Jim Meyering <=
- Re: Removing -Wunsuffixed-float-constants, -Wdouble-promotion, -Wformat-zero-length, Simon Josefsson, 2011/11/30
Re: Removing -Wunsuffixed-float-constants, -Wdouble-promotion, -Wformat-zero-length, Simon Josefsson, 2011/11/30
Re: Removing -Wunsuffixed-float-constants, -Wdouble-promotion, -Wformat-zero-length, Jim Meyering, 2011/11/30
Re: Removing -Wunsuffixed-float-constants, -Wdouble-promotion, -Wformat-zero-length, Karl Berry, 2011/11/30
Re: Removing -Wunsuffixed-float-constants, -Wdouble-promotion, -Wformat-zero-length, Simon Josefsson, 2011/11/30
Re: Removing -Wunsuffixed-float-constants, -Wdouble-promotion, -Wformat-zero-length, Eric Blake, 2011/11/30
Re: Removing -Wunsuffixed-float-constants, -Wdouble-promotion, -Wformat-zero-length, Simon Josefsson, 2011/11/30
Re: Removing -Wunsuffixed-float-constants, -Wdouble-promotion, -Wformat-zero-length, Jim Meyering, 2011/11/29
Re: Removing -Wunsuffixed-float-constants, -Wdouble-promotion, -Wformat-zero-length, Eric Blake, 2011/11/29
Re: Removing -Wunsuffixed-float-constants, -Wdouble-promotion, -Wformat-zero-length, Paul Eggert, 2011/11/29