[Bug c/53072] automatically set Init() only if option was not set in some other way

manu at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Apr 28 00:17:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53072

--- Comment #6 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2012-04-28 00:17:33 UTC ---
(In reply to comment #5)
> 
> It may be possible - you'd need to avoid implicit setting marking the 
> implied option as "set" - and I don't think delaying processing of Init() 
> will actually be helpful anyway.

Then, I don't understand what is your plan. The current hack uses Init(-1) and
checks if warn_whatever == -1 as late as possible before setting the real
default value. My idea was to mimic this, but using the "set" structure instead
of -1, and using the Init value as the default value. A strategy to implement
this could be to introduce a new Default(), which will be set unconditionally
if the option is "unset". This will allow to get rid of Init(-1) incrementally.



More information about the Gcc-bugs mailing list