This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug driver/44210] Extended warning control: like -Wevery -show-warnings



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]