Warning C vs C++
Kai Henningsen
kaih@khms.westfalen.de
Sat Sep 24 14:48:00 GMT 2005
bje@au.ibm.com (Ben Elliston) wrote on 21.09.05 in <dgqn0o$jae$1@sea.gmane.org>:
> Per Abrahamsen wrote:
>
> > A -Weverything that turned on all boolean warnings would be nice. It
> > would be useless alone, but nice followed by a lot of
> > -Wno-somesillywarning -Wno-anothersillywarning arguments.
>
> I agree. I acknowledge that it would be useless in the general sense (you
> couldn't use it in Makefiles),
That's exactly where I *would* use it. That's exactly where I currently
have lots and lots of individual warning flags.
Oh, not in software intended to be ported to everything from a mainframe
to a carefully-preserved 4004, of course. But not all software is like
that. (And even in that case, it'd still be useful for a sort of
"developer mode" environment (something still more restricted in
applicability than maintainer mode).)
>but it would be nice to be able to use such
> an option for time to time to audit the code in the way that you might use
> lint(1).
I strongly prefer "time to time to audit the code" to mean "everytime I
compile it". When the latest change causing the new message is still fresh
on my mind, and so is the problem it was supposed to solve.
Just like, you know, *every* non-doc patch for gcc is supposed to have
been checked against the testsuite.
MfG Kai
More information about the Gcc
mailing list