This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PR 36778: Should we have -Wfatal-warnings
- From: Paul Brook <paul at codesourcery dot com>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>
- Cc: "'gcc at gcc dot gnu dot org'" <gcc at gcc dot gnu dot org>, Jason Merrill <jason at redhat dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>
- Date: Sat, 1 Oct 2011 02:35:25 +0100
- Subject: Re: PR 36778: Should we have -Wfatal-warnings
- References: <4E866612.9080403@oracle.com>
> Hi,
>
> I was having a look to this long standing, and unconfirmed, PR:
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36778
>
> and the rationale makes sense to me. What do you think, shall we have
> -Wfatal-warnings too, together with -Wfatal-errors?
>
> AFAICS, the patch would be rather trivial, little more than the
> attached, modulo a few tests and a few lines of documentation...
This isn't actually necessary, they just need to make their test harness a bit
smarter.
If gcc promotes a warning to an error then it prints
"cc1: all warnings being treated as errors"
If you see this message then you hit a warning (promoted to an error).
If you don't see this message then you hit an actual error.
A quick test shows this is true for all gcc since at least 4.4.
Paul