https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79659

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Manuel López-Ibáñez from comment #2)
> (In reply to Martin Liška from comment #1)
> > because we generate assert for optimization options:
> > 
> >   gcc_assert (IN_RANGE (opts->x_flag_lifetime_dse, -128, 127));
> > 
> > I'm wondering whether cutting values out of possible range to maximum (or
> > minimum) would be desired?
> 
> Even that range is too large for an option that only takes 0,1,2
> 
> It should simply emit an error that the value passed is not within the
> allowed values. Allowed values should be encoded in the .opt files.

Yes, I've prepared patch which does that:
https://gcc.gnu.org/ml/gcc-patches/2017-03/msg00806.html

What remains to be added are better assert when an option is streamed out (in).
I'll do that incrementally.

Reply via email to