GCC Unlikely To Adopt A "-Weverything" For Exposing All Possible Code Warnings

Written by Michael Larabel in GNU on 23 January 2019 at 04:58 PM EST. 36 Comments
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.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week