Compile failure in builtin-attrs.def

David Holland dholland@eecs.harvard.edu
Tue Feb 3 17:47:00 GMT 2004


builtin-attrs.def attempts to do token pasting of symbols of the form
"1_0".

While (presumably) gcc accepts this, such symbols are not valid
preprocessing tokens; they're not identifiers, because they begin with
a digit, and they're not valid numbers either.

The MacOS X compiler quite properly treats the 1_0 as two tokens, 1
and _0, and emits a space between them when preprocessing. Needless to
say, this breaks the build.

I hit the problem when building gcc-3.3.2 as a cross-compiler, but
it's substantively unchanged in the current cvs.

It appears to be sufficient to move the preceding '_' character out of
the token-pasting macro and into the arguments, thus making them be
legal identifiers of the form "_1_0".

I have a patch, but from what I hear regarding copyright paperwork
it's probably easier for everyone if I don't send it.

-- 
   - David A. Holland / dholland@eecs.harvard.edu



More information about the Gcc-bugs mailing list