------- Comment #14 from joseph at codesourcery dot com  2010-04-15 22:32 
-------
Subject: Re:  Unexpected error message for bad command line
 argument

On Thu, 15 Apr 2010, manu at gcc dot gnu dot org wrote:

> ------- Comment #13 from manu at gcc dot gnu dot org  2010-04-15 22:21 -------
> (In reply to comment #12)
> > 
> > I don't see adding function pointers as a particular improvement over the 
> > existing code where switch statements can already handle group options 
> 
> That code does not work when options are disabled/enabled from anywhere else
> apart from the command line. See PR40989.

What I'd imagine for options enabled from pragmas / attributes is that 
there would be a record kept of the state of options before defaults were 
applied, and such a late-applied option would effectively be appended to 
those on the command line, with the defaults then reapplied to determine 
the options subsequently in effect (or in effect for an individual 
function, etc.).

But for the -Werror=foo issue I'd have thought that making it send the 
-Wfoo option through the existing option processing machinery - as if both 
were specified consecutively on the command line - should suffice.  That 
seems largely independent of my proposal, and avoids any issues with 
needing functions to be present for all front ends.


-- 


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

Reply via email to