how widespread is this cpp bug?

Henry Spencer henry at utzoo.uucp
Fri Dec 2 05:45:50 AEST 1988


In article <49179 at pyramid.pyramid.com> markhall at pyramid.UUCP (Mark Hall) writes:
>		prin/* comment in the middle */tf ( "Hello World.\n" );
>
>...Does your cpp have this `feature'?  Anyone know the history?  I
>suspect that AT&T and SUN know about this, but have chosen not to fix it.
>Anyone know why?

This token-concatenation technique is a quirk (quirk, n:  accidental and
unintended behavior that is not clearly a bug and may be useful) of the
Reiser cpp implementation, which is universal in AT&T-derived compilers
and virtually nonexistent elsewhere.  It has seen enough use to make
folks who already have it reluctant to drop support for it, but it is
a quirk of specific compilers and was never documented as a property of
the language.

X3J11 has provided the same capability in a cleaner and more portable way
(the Reiser trick does not work in tokenizing preprocessors) with their ##
operator.  Ugh.
-- 
SunOSish, adj:  requiring      |     Henry Spencer at U of Toronto Zoology
32-bit bug numbers.            | uunet!attcan!utzoo!henry henry at zoo.toronto.edu



More information about the Comp.lang.c mailing list