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: Move more predefined macros


Zack Weinberg wrote:-

> This patch moves the definition of __REGISTER_PREFIX__,
> __USER_LABEL_PREFIX__, and __VERSION__ into c-common.c, and eliminates
> __HAVE_BUILTIN_SETJMP__.  It also adjusts the way the
> STDC_0_IN_SYSTEM_HEADERS hack works so that it does not require
> #ifdeffage in cpplib.
 
Nice.

> No target-specific code is affected.  Neil, I'd like your opinion on
> the aesthetics of the change to builtin_define_with_value; should the
> flag parameter be two separate functions instead?

It's not pretty, but OK for now I guess.  Probably two functions would
be better.

> Future potential changes along these lines are: move the
> builtin_define_* routines from c-common to cpplib (they are
> semi-duplicates of internal cpplib routines); move the definitions of
> __cplusplus etc to c-common.  I'd appreciate opinions on both.

I'm thinking of having a new interface in cpplib that takes the
macro and its expansion separately.  At present, we just burn cycles
copying the string, replacing the first '=', and then letting the
lexer separate them out again.

It might be nicer to just to a cpp_lookup() on the name and jump
straight into lexing the definition.

Neil.


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