This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Where did the warning go?
- From: "John (Eljay) Love-Jensen" <eljay at adobe dot com>
- To: GCC-help <gcc-help at gcc dot gnu dot org>
- Date: Wed, 25 Feb 2009 04:25:20 -0800
- Subject: Re: Where did the warning go?
Hi everyone,
[Tom]> I think most long term developers really just want the warnings for
two things. Things that are undefined behaviour, and things that are likely
a typo...
I don¹t mind keeping -Wall with the current meaning, and not deprecating it.
I, as a long term developer who has been developing for over 30 years, and
in C/C++ for over 20 years, using GCC since 2.95 came out, do wish that
there was a -Weverything flag that enabled all -W* toggle warnings.
Why?
Because I use GCC as a lint-like tool.
I like to be able to see what warnings my code generates, vet those warnings
and vet my code, then decide to disable the warning or fix my code.
I deeply appreciate that GCC has taken on incorporating (sensible) lint-like
functionality into the compiler itself, which uses -Wfoo toggles. (I can
even appreciate that -Wall is "select popular warnings", and -Wextra is
"select additional less popular warnings".)
Right now, I have a command-line for GCC g++ that is very, very, very, very
long, because I enable the warnings I know about. But I may have missed one
or two. And more may come out with the next version of GCC that I am
unaware about.
I wish I had a -Weverything flag.
As long as I'm making wishes, I also wish warnings were emitted like this:
test.cpp:6: -Wunused warning: unused variable 'u'
...rather than...
test.cpp:6: warning: unused variable 'u'
Just my $0.02.
Sincerely,
--Eljay