GCC Unlikely To Adopt A "-Weverything" For Exposing All Possible Code Warnings
While the LLVM Clang compiler has a -Weverything switch to enable every possible warning, it's unlikely the GNU Compiler Collection will offer a similar option.
Since yesterday has been a mailing list discussion about adding the "-Weverything" option to enable every possible compiler warning, but the overwhelming consensus is that it's a bad idea. Contrary to the naming of the common "-Wall" that doesn't technically enable all warnings, the -Weverything option with Clang does; this includes superfluous warnings and warnings that are too niche or generate too much noise than assistance to developers.
With the -Weverything option added by LLVM/Clang developers, it was intended more for automated tools parsing the data but some users/developers have also tried the option too for clearing out possible rare warnings missed by the other warning options. But given the GCC thread this week, having a "-Weverything" is way too noisy and not too helpful for a vast majority of users (developers) out there.
Seeing this idea rejected by the upstream GCC developers doesn't come as much of a surprise: a decade ago was a proposal for -Wall-all of similar nature to enable every possible warning option under the sun. That proposal was rejected.
For the lack of a -Weverything option, there is gcc -Q --help=warning that can be used for showing all warning options supported by the given compiler release.
Since yesterday has been a mailing list discussion about adding the "-Weverything" option to enable every possible compiler warning, but the overwhelming consensus is that it's a bad idea. Contrary to the naming of the common "-Wall" that doesn't technically enable all warnings, the -Weverything option with Clang does; this includes superfluous warnings and warnings that are too niche or generate too much noise than assistance to developers.
With the -Weverything option added by LLVM/Clang developers, it was intended more for automated tools parsing the data but some users/developers have also tried the option too for clearing out possible rare warnings missed by the other warning options. But given the GCC thread this week, having a "-Weverything" is way too noisy and not too helpful for a vast majority of users (developers) out there.
Seeing this idea rejected by the upstream GCC developers doesn't come as much of a surprise: a decade ago was a proposal for -Wall-all of similar nature to enable every possible warning option under the sun. That proposal was rejected.
For the lack of a -Weverything option, there is gcc -Q --help=warning that can be used for showing all warning options supported by the given compiler release.
36 Comments