This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug driver/44210] Extended warning control: like -Wevery -show-warnings
- From: "redi at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 May 2010 13:31:03 -0000
- Subject: [Bug driver/44210] Extended warning control: like -Wevery -show-warnings
- References: <bug-44210-19151@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from redi at gcc dot gnu dot org 2010-05-20 13:31 -------
(In reply to comment #0)
> This would allow reducing this (infamous) list:
> -W -Wall -Wextra -Wstrict-aliasing=2 -Wfloat-equal -Wundef -Wconversion
> -Winline -Wmissing-field-initializers -Wshadow -Wcast-align -Wformat=2
> -Wsequence-point -Woverloaded-virtual
> (I never know which one is enabled by -W, -Wall, -Wextra...)
-W is a synonym for -Wextra, so it is pointless to use both (older versions
won't accept -Wextra, new versions don't need both)
The manual fairly clearly documents what controls what:
http://gcc.gnu.org/onlinedocs/gcc-4.5.0/gcc/Warning-Options.html
>
> -show-warnings: would show the enabled warnings
> ================================================
> An example usage would be:
> $ gcc -c somefile.c -Wall -Werror -Wno-error=reorder -Wno-unused-function
> ..... -show-warnings
> status name from
> ------------------------------------------------
> ERROR address -Wall -Werror
> warn reorder -Wall -Werror -Wno-error=reorder
> - unused-function -Wno-unused-function
> - clobbered (would be enabled by -Wextra)
> ...
> ------------------------------------------------
> 372 known warnings, 300 shown, 297 as errors (muted: 72)
>
> If the team is interested, I'll consider providing a patch.
>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44210