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/PR c/59304] #pragma diagnostic pop after warning fails for options unspecified in the command-line and disabled by default


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


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