Patch to reformat builtins.def

Zack Weinberg zack@codesourcery.com
Fri Aug 1 17:08:00 GMT 2003


"Kaveh R. Ghazi" <ghazi@caip.rutgers.edu> writes:

> 2.  Similarly, I tried taking out BUILT_IN_ from the enums and getting
>     it back via token pasting in the DEF_* macros.  However that
>     changed BUILT_IN_VA_START to just VA_START.  This token is now the
>     same as the poisoned libiberty macro so it didn't work. :-/
>     Suggestions welcome.

You could downcase the variable bit of each enumerator:
BUILT_IN_va_start for instance.  There is precedent in the CODE_FOR_*
enumerators, and furthermore this lets you get rid of the repeated
names:

#define DEF_GCC_BUILTIN(NAME, TYPE, ATTRS) \
  DEF_BUILTIN (BUILT_IN_##NAME, "__builtin_" #NAME, ...)

It does touch rather more of the compiler, but in a mechanical way.

> 	* builtins.def (DEF_GCC_BUILTIN, DEF_LIB_BUILTIN,
> 	DEF_EXT_LIB_BUILTIN, DEF_C99_BUILTIN, DEF_C99_C90RES_BUILTIN):
> 	Prepend "__builtin_" onto NAME with string concatenation.  Remove
> 	explicit "__builtin_" from each macro call.
>
> 	Reformat entire file.

This is OK.

zw



More information about the Gcc-patches mailing list