This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/53313] Add warning levels
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 24 Apr 2015 10:29:39 +0000
- Subject: [Bug other/53313] Add warning levels
- Auto-submitted: auto-generated
- References: <bug-53313-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53313
--- Comment #9 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> ---
(In reply to David Stone from comment #8)
> I have changed my opinion on this and agree that warning levels are probably
> not the way to go. The two things from this that I do still want are
>
> -Weverything-and-I-really-mean-it-this-time
Do you really want -Wdouble-promotion:
float area(float radius)
{
return 3.14159 * radius * radius; // warns!
}
And -Wtraditional? It warns for example for:
* The unary plus operator.
* A switch statement has an operand of type long.
And what should happen for -Wc90-c99-compat -Wc99-c11-compat and -Wc++-compat?
They will warn for bool, long long, etc, even if you use '-std=c11'.
As an exercise, you can take the list given by:
wget https://gcc.gnu.org/svn/gcc/trunk/gcc/doc/invoke.texi
grep '@item -W[^ ]\+' -o invoke.texi | grep -v '@item -Wno-\|-Werror\|-Wfatal-'
and try to build any large piece of software with it and see if you still want
-Weverything-and-I-really-mean-it-this-time.