This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Error on Enum option without RejectNegative
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, Eric Botcazou <ebotcazou at adacore dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 4 Jan 2017 21:18:01 +0000
- Subject: Re: [PATCH] Error on Enum option without RejectNegative
- Authentication-results: sourceware.org; auth=none
- References: <20170102192726.GH21933@tucnak> <CAFiYyc3jFQXnsGSV5iuJuEc6cm0Sa=3=amDcirP46brRpRvXjw@mail.gmail.com> <20170104114031.GI21933@tucnak> <CAFiYyc2WJFPpYbGOebwNmfyyrOJXXoTJpecN8mcEEWKmDSxxBg@mail.gmail.com> <20170104211305.GQ21933@tucnak>
On Wed, 4 Jan 2017, Jakub Jelinek wrote:
> On Wed, Jan 04, 2017 at 01:31:28PM +0100, Richard Biener wrote:
> > > Rather than implicit RejectNegative it might be better to just diagnose
> > > such options as invalid. If you agree, I can implement that as follow-up.
> > > Also note that RejectNegative is only needed on the Enum switches that have
> > > the default negatives (that is [Wfm] prefixed I think).
> >
> > That would be nice.
>
> This works (and r244071 fails to build with it, r244072 succeeds).
> The error is emitted above the option, so it is not hard to find out what
> option it is (and it is similar to other similar errors diagnosed by
> optc-gen.awk).
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
>
> 2017-01-04 Jakub Jelinek <jakub@redhat.com>
>
> * optc-gen.awk: Emit #error for -W*/-f*/-m* Enum without
> RejectNegative.
OK.
--
Joseph S. Myers
joseph@codesourcery.com