This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Count -Werror promoted warnings separately (PR middle-end/48087)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]