Patch to reformat builtins.def

Kaveh R. Ghazi ghazi@caip.rutgers.edu
Sat Aug 2 05:55:00 GMT 2003


 > From: "Zack Weinberg" <zack@codesourcery.com>
 > 
 > "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.

Doesn't work.  While this does side-step the poinsoned VA_START macro,
using lowercase and eliminating BUILT_IN_ means we get spanked by the
poisoned BSD string and malloc routines:

 > builtins.def:214:25: attempt to use poisoned "bcmp"
 > builtins.def:215:25: attempt to use poisoned "bcopy"
 > builtins.def:216:25: attempt to use poisoned "bzero"
 > builtins.def:226:25: attempt to use poisoned "rindex"
 > builtins.def:233:25: attempt to use poisoned "strdup"
 > builtins.def:277:25: attempt to use poisoned "calloc"
 > builtins.def:303:25: attempt to use poisoned "malloc"

It's not critical, but got any other ideas?

--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu



More information about the Gcc-patches mailing list