Concatenating with a compile-time definition in "ANSI" CPP

Doug Gwyn gwyn at smoke.BRL.MIL
Wed Oct 4 05:35:31 AEST 1989


In article <17936 at pasteur.Berkeley.EDU> hunt at ernie.Berkeley.EDU.UUCP (Jim Hunt) writes:
>You can do this in non ANSI environments (at least Sun) with
>#define MyInit(arg)   arg/**/Init
>which is an ugly hack on the preprocessor, that is also defined
>in the ANSI C preprocessor!

What are you talking about?  That's two tokens, not one spliced one,
in both Standard C and K&R C.  It was the UNIX (Reiser) cpp that was
responsible for this misimplementation becoming widespread.



More information about the Comp.lang.c mailing list