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] Error on Enum option without RejectNegative


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


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