This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH/PR c/59304] #pragma diagnostic pop after warning fails for options unspecified in the command-line and disabled by default
- From: Dodji Seketeli <dodji at redhat dot com>
- To: Manuel LÃpez-IbÃÃez <lopezibanez at gmail dot com>
- Cc: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 20 Aug 2014 11:50:03 +0200
- Subject: Re: [PATCH/PR c/59304] #pragma diagnostic pop after warning fails for options unspecified in the command-line and disabled by default
- Authentication-results: sourceware.org; auth=none
- References: <CAESRpQCXu+ckPTyEx4czg63JMPwGy7Dnb0qp6zqiezZGWC-PRA at mail dot gmail dot com>
Hello Manuel,
Manuel LÃpez-IbÃÃez <lopezibanez@gmail.com> writes:
> The idea is that when we see a change of classification, and the
> option was originally unspecified, we record the command-line status.
> This way, when doing pop later, we already check if the option was
> reclassified so we get the command-line status. This also works with
> -Wall, since all dependent options go through set_option and call
> diagnostic_classify_diagnostic. But we have to call it before changing
> the option status.
>
> Bootstrapped and regression tested on x86_64-linux-gnu.
>
> OK?
Yes, this looks OK to me.
>
> gcc/ChangeLog:
>
> 2014-08-19 Manuel LÃpez-IbÃÃez <manu@gcc.gnu.org>
>
> PR c/59304
> * opts-common.c (set_option): Call diagnostic_classify_diagnostic
> before setting the option.
> * diagnostic.c (diagnostic_classify_diagnostic): Record
> command-line status.
>
> gcc/testsuite/ChangeLog:
>
> 2014-08-19 Manuel LÃpez-IbÃÃez <manu@gcc.gnu.org>
>
> PR c/59304
> * gcc.dg/pr59304.c: New test.
Thank you!
--
Dodji