As I always wonder if my compiler could help me find more bugs,
and the list of warnings I enable tend to be very long,
and -Wall is not enough for me...

(This bug certainly depends on #44209: "Some warnings are not linked to
diagnostics options")

It would be great to have the following options:
(I really don't care for their names if you have better suggestions;
I focus on the functionality)

-Wevery:  would enable all warnings known to gcc 
================================================
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...)
to a single -Wevery with a few -Wno-XXXXXX

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


-- 
           Summary: Extended warning control: like -Wevery -show-warnings
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: driver
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: eric dot estievenart at free dot fr
 GCC build triplet: does not apply
  GCC host triplet: does not apply
GCC target triplet: does not apply


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44210

Reply via email to