This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Count -Werror promoted warnings separately (PR middle-end/48087)
- From: Gabriel Dos Reis <gdr at cs dot tamu dot edu>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 21 Mar 2013 10:47:35 -0500
- Subject: Re: [PATCH] Count -Werror promoted warnings separately (PR middle-end/48087)
- References: <20130321125235 dot GS12913 at tucnak dot redhat dot com>
Jakub Jelinek <jakub@redhat.com> writes:
| Hi!
|
| This is a patch I had written two months ago, but concluded it to be too
| risky for 4.8 at that point.
|
| The issue this patch attempts to solve is that compiler behaves differently
| in some cases depending on if we've just warned about something or if
| -Werror has been in effect and that warning has been promoted to error.
| Of course the difference should be the exit code from the compiler and
| the wording of the warning resp. error, but various bits of code e.g. in the
| frontends check whether any errors have been reported already (or reported
| while parsing some construct etc.), and if they have been, act differently
| from the case when there haven't been any errors.
|
| The patch just counts the warnings promoted to errors in a different
| counter, werrorcount, and thus each place can actually decide if it wants to
| treat warnings promoted to errors as warnings, or as errors, or something
| else for its purposes.
|
| Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
It makes sense; patch OK. Thanks!
-- Gaby