Author Topic: -Weverything option leads to far too many warnings - is strongly unrecommended  (Read 310 times)

Offline pabristow

  • Multiple posting newcomer
  • *
  • Posts: 62

-Weverything option leads to far too many warnings - is strongly unrecommended - in favour of -Wall.

C:\Program Files\CodeBlocks\share\CodeBlocks\templates\wizard\common_functions.script

contains line 52

    else if (   GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("clang")) )
    {
        base.AddCompilerOption(_T("-Weverything"));
    }

https://quuxplusone.github.io/blog/2018/12/06/dont-use-weverything/

Arthur O’Dwyer says

"Put -W -Wall in your build flags.
The Clang devs will take care of making sure this is a sensible warning level for all codebases, including yours.
Listen to the Clang devs when they say, “Don’t put -Weverything in your build flags.”
Posted 2018-12-06
"

May I suggest that the line below would be better. I find that -Weverything  takes hours to compiler with reams of logs, and I can't see the wood for the trees. Anyone with much cleaner code than mine can always add -Weverything if they wish ;-)

use -Wall as default warning level. base.AddCompilerOption(_T("-Wall"));


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12739
    • Travis build status
Patches welcome? Defaults are debatable I don't intend to debate them, but I don't intend to change it at the moment.

Some day I'll get to the annoying slowness of the logs and I'll make it usable. :(
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline pabristow

  • Multiple posting newcomer
  • *
  • Posts: 62
OK - I have patched my version so I am happy for now.
There seems to be a very firm recommendation not to use -Weverything unless you are Clang developer, so any debate seems to have a clear outcome.

What form would you like a patch - it's change line 52 from

        base.AddCompilerOption(_T("-Weverything"));

to

        base.AddCompilerOption(_T("-Wall"));

The problem is not the speed of the logs, it's the volume!

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12739
    • Travis build status
There seems to be a very firm recommendation not to use -Weverything unless you are Clang developer, so any debate seems to have a clear outcome.
Do you have a link where this claim can be verified?

For the patch: Either something which could be applied with git or svn...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]