This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR c/c++/diagnostics/66098 Take -Werror into account when deciding what was the command-line status
- From: Manuel LÃpez-IbÃÃez <lopezibanez at gmail dot com>
- To: Gcc Patch List <gcc-patches at gcc dot gnu dot org>, Dodji Seketeli <dodji at redhat dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>, Marek Polacek <polacek at redhat dot com>, Jason Merrill <jason at redhat dot com>
- Date: Mon, 10 Aug 2015 16:37:51 +0200
- Subject: Re: PR c/c++/diagnostics/66098 Take -Werror into account when deciding what was the command-line status
- Authentication-results: sourceware.org; auth=none
PING^2: https://gcc.gnu.org/ml/gcc-patches/2015-07/msg02581.html
On 3 August 2015 at 20:47, Manuel LÃpez-IbÃÃez <lopezibanez@gmail.com> wrote:
> PING: https://gcc.gnu.org/ml/gcc-patches/2015-07/msg02581.html
>
> Thanks,
>
> Manuel.
>
> On 30 July 2015 at 17:35, Manuel LÃpez-IbÃÃez <lopezibanez@gmail.com> wrote:
>> When I fixed PR59304, I forgot that a command-line warning can be also
>> an error if -Werror was enabled. This introduced a regression since
>> anything enabled in the command-line together with -Werror would get
>> initially classified as a warning when reaching the first #pragma GCC
>> diagnostic, and this will be the setting after a #pragma pop.
>>
>> Options that appear as arguments of -W[no-]error= are not affected by
>> this since those are initially classified as errors/warnings even
>> before reaching the first #pragma, thus the pop sets them correctly
>> (before and after this patch). Nonetheless, the tests also check that
>> they work correctly.
>>
>> Boot®tested on x86_64-linux-gnu.
>>
>> OK?
>>
>>
>> gcc/ChangeLog:
>>
>> 2015-07-29 Manuel LÃpez-IbÃÃez <manu@gcc.gnu.org>
>>
>> PR c/66098
>> PR c/66711
>> * diagnostic.c (diagnostic_classify_diagnostic): Take -Werror into
>> account when deciding what was the command-line status.
>>
>> gcc/testsuite/ChangeLog:
>>
>> 2015-07-29 Manuel LÃpez-IbÃÃez <manu@gcc.gnu.org>
>>
>> PR c/66098
>> PR c/66711
>> * gcc.dg/pragma-diag-3.c: New test.
>> * gcc.dg/pragma-diag-4.c: New test.