The ability to enable absolutely all warnings (-Wall -Wextra -Wyada-yada-yada), and then selectively disable the one's that are not desired. Rather than the opposite. Example: g++ -c -Wall-all -Wno-unreachable-code -Wno-long-long -Wno-four-char-constants test.cpp -o test.o
That begs the question: what's *not* covered by -W -Wall -Wextra [-ansi -pedantic-errors -Werror]? There are also some warning flags that are parameterized (-Wstrict-aliasing=#, -Wformat=#), should those be maxed out as well? Maybe we could call it -WALL? :)
Actually more than that, there are new warnings options each release so really if we have this we will get complaints about warnings options get added. so I am going to close this as won't fix.
Subject: Re: -Wall-all to enable all warnings > ------- Comment #2 from pinskia at gcc dot gnu dot org 2007-04-14 21:18 ------- > Actually more than that, there are new warnings options each release so really > if we have this we will get complaints about warnings options get added. so I > am going to close this as won't fix. I also don't really see this ever happening because the libstdc++ headers aren't clean w.r.t. -Weffc++ (if you propose to turn those on too). Even the man page warns about it. (Vast majority seem to be "non-virtual destructor in base class" nonsense from my previous attempts.) Even if fine-grain, source-annotated warning suppressions (__attribute__, etc.) kick in, *some* of the extra warnings would be a nuisance to work-around, and extra work for library maintainers. FWIW, -W -Wall has served me quite well. (-W is -Wextra since 3.4)
*** Bug 47824 has been marked as a duplicate of this bug. ***
*** Bug 66293 has been marked as a duplicate of this bug. ***
*** Bug 53313 has been marked as a duplicate of this bug. ***
Marc, in reply to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53313#c10 I see there may be value in a -Weverything flag for debugging (and to check if something already warns for a specific testcase). I believe it will be useless for users, but, hey, I'm happy if the description warns users profusely about it, so we don't get a tsunami of reports complaining that "it warns too much". Your proposed patch (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53313#c5) is probably a good start. It probably doesn't maximize warnings that take several levels (like Wstrict-overflow=) or warnings that internally have several levels (like Wmain). You should only need to convince Joseph or Dodji.
I would also quite like to note myself that numerous people I know have found Clang's `-Weverything` very useful, especially for finding new warnings. The only way I've been able to find some of GCC's most useful flags was by manually making a full list off GCC's manual (which took a long while !), and I have to say this is a particularly annoying process to go through, especially when such a list has to be updated on every new GCC version.
You're doing it wrong. gcc -Q --help=warnings
Well, that does help, although it is still a significant annoyance that would take more than its fair share of time to handle. (Also, is it still really that much of a concern anymore that users would think -Weverything is a normal flag to set in compilations ? I've basically never seen this happen with Clang's flag, so it seems like an unreasonable concern, especially considering the amount of warning flags that have been added since 2007+the amount of warning flags that are rather specialized and obviously result in an extremely large amount of false positives on a lot of code)
I'd like to repeat my suggestion from bug 66293 comment #6: what if -Weverything always printed at least 1 warning from itself ("Warning: Don't use -Weverything [-Weverything]") in addition to all the other warnings that it enables? That way people would be less tempted to try to use it with -Werror.