[PATCH 1/2] PR c/65403 - Ignore -Wno-error=<some-future-warning>

Alex Henrie alexhenrie24@gmail.com
Wed Jun 26 02:04:00 GMT 2019


On Wed, Jun 19, 2019 at 11:52 AM Jeff Law <law@redhat.com> wrote:
>
> On 3/18/19 8:46 PM, Alex Henrie wrote:
> > From: Manuel López-Ibáñez <manu@gcc.gnu.org>
> >
> > * opts.c: Ignore -Wno-error=<some-future-warning> except if there are
> > other diagnostics.
> That's not a complete ChangeLog entry.  Each file/function changed
> should be mentioned.  Something like this:
>
>         * opts-common.c (ignored_wnoerror_options): New global variable.
>         * opts-global.c (print_ignored_options): Ignore
>         -Wno-error=<some-future-warning> except if there are other
>         diagnostics.
>         * opts.c (enable_warning_as_error): Record ignored -Wno-error
>         options.
>         opts.h (ignored_wnoerror_options): Declare.

Thanks!

> If HINT is set, do we still want to potentially push the argument onto
> the ignored_wnoerror_options list?  My inclination is yes since the hint
> is just that, a fuzzily matched hint.  That hint may be appropriate
> (user typo'd or somesuch) or it may be totally offbase (user was trying
> to turn off some future warning.

I don't think we need to support hints in the case of
-Wno-error=<some-unknown-warning> because we don't support hints for
-Wno-<some-unknown-warning> and as you pointed out, hints are less
likely to be helpful here because the warning may be perfectly valid
in a newer version of GCC.

I'll send rebased patches later tonight. Thanks for the feedback!

-Alex



More information about the Gcc-patches mailing list