cpplib: Language defaults

Neil Booth neilb@earthling.net
Sat Nov 18 15:50:00 GMT 2000


Zack Weinberg wrote:-

> I like this idea.  Your implementation is a tad confusing.  I think it
> would be more readable as a case statement:
> 
>   case LANG_GNU89:
>      a = 1; b = 1; ...
>      break;

OK, will do.

> even if this does mean it's longer.  Also, you ought to distinguish
> between strictly conforming C++ and extended C++ modes.  This matters
> at least for trigraph interpretation.  We ought to have a -std=c++98
> switch.

I'll add that.  Do we want to define __STRICT_ANSI__ for C++98 too?

> We have all these other identifiers with CPP in them that have nothing
> to do with C++.  Therefore I think the enum should use CXX instead of
> CPP.  Furthermore, the _GNU?? and _STD?? constants should indicate
> explicitly that they are C.

Done.

> CPP_OPTION (pfile, c89) is not used consistently.  It's got three
> uses:

I'll fix these up, too.

> >       CPP_OPTION (pfile, dollars_in_ident) = 1;
> 
> This should only be set in extended mode.  And do we really want to
> turn it off in assembly mode?

OK, I'll do it extended only.  It has been off in assembler for a
while, so I'll leave it like it was.  Feel free to change it.

Neil.


More information about the Gcc mailing list