Where did the warning go?

John Z. Bohach jzb2@aexorsyst.com
Wed Feb 25 17:16:00 GMT 2009


On Wednesday 25 February 2009 08:16:23 am Tom St Denis wrote:
> Eivind LM wrote:
<...snip...>

I've been reading this thread, and there is an important point that 
hasn't been made yet, or at least I would like to emphasize it if it 
has:

Compiler default behavior changes are _REALLY_ annoying.  Even when its 
done to fix a gcc bug, or for other good reasons, it still causes a lot 
of churn either in fixing Makefiles or fixing source code.

I build custom distributions as well as various other s/w for a living, 
and just upgrading my toolchain from 4.0.2 to 4.2.2 caused almost half 
(of the over 200) purely open-source packages that I build to either 
need a patch or upgrade to a new version...and this is especially true 
with C++ code.

Those clamoring for default behavior changes should consider that many 
(millions, probably) of source packages would likely need modifications 
if/when basic default behaviors change.  And -Wall changes are as basic 
as it gets.

I think it is a legitimate gripe that the warnings with -Wall are not 
set in stone already, and sometime change even now, but the solution is 
certainly not to change it some more.

However, I recognize that people may want a -Weverything flag, and that 
does seem like a reasonable compromise, as that could be used as a 
poor-man's splint or other static-analysis tool.  I happen to agree 
with Tom that lint and such is not a substitute for good programming 
practices, but what the heck...if the gcc developers can be convinced 
to add a -Weverything, why not.  AS LONG AS THE CURRENT DEFAULTS STOP 
CHANGING.



More information about the Gcc-help mailing list