On 12 October 2017 at 09:46, Oren Ben-Kiki wrote: > Motivation/Use case: > > * Since gcc/g++ intentionally does not have `-Weverything`, there is a > number of explicit `-W...` flags one might wish to specify explicitly. Fair > enough. > > * Additional `-W...` flags are introduced in new gcc/g++ versions, which > check for new potential code smells, possibly related to later language > standards. That's great (thanks!).
And the most widely useful ones are added to -Wall so you don't need to know about them and add them explicitly. The ones that are not in -Wall are not so widely useful anyway, so it's not such a problem if you don't know about them until you read the release notes. > * Not all platforms run the latest gcc/g++ compiler version. So build tools > need to deal with a range of versions. > > Taking these three points together, we have a problem. The build tool > wishes to specify `-Wshiny-new-warning` but may only do so if the gcc/g++ > compiler version is above some version X. > > This is difficult for several reasons: > > * The documentation does not clearly specify the 1st compiler version that > supports each error/warning command line flag. One has to manually > backtrack through the release notes for all the compiler versions. > > In fact the documentation also doesn't make it easy to see which flags are > covered by other flags - one has to read through the documentation, one > flag at a time, and extract the information from the English text. Some > form of a more structured table would have been awesome: 1st compiler > version supporting the flag, the list of other flags such as `-Wall` that > imply the flag, maybe a list of related flags such as `-f...`. But that > aside... People have asked for this before, and the response has been given that if you want to put together that information that would be great. It could be added to the wiki. Nobody has ever bothered to do the work, they just want other people (who are busy working on other things) to do it for them. Apparently nobody wants it enough to help create it. FWIW "gcc -Q --help=warnings" can be used to list the known warnings and see which warnings are covered by other flags, e.g. compare the output with and without -Wall.