ANSI Preprocessor Was: how widespread is this cpp bug?
Arturo Perez Ext.
aperez at bronco.uucp
Tue Dec 6 02:00:15 AEST 1988
>From article <9026 at smoke.BRL.MIL>, by gwyn at smoke.BRL.MIL (Doug Gwyn ):
> In article <6625 at csli.STANFORD.EDU> wagner at arisia.xerox.com (Juergen Wagner) writes:
>> proc/**/VERSION
>>People relying on this bug should change their habits. There are better ways
>>to concatenate tokens.
>
> No, for Reiser-based preprocessors there aren't any better ways.
> ANSI-style token pasting is fairly new, and many C implementations
> in current use do not support it.
I don't really know anything about the ANSI view of things. All I know
is what I glean from this news group (And I must admit, I am impressed by
the high level of knowledge exhibited).
Well, the upshot of all this is: how do ANSI compilers allow the concatenating
of preprocessor macro parameters? Under pcc you can do things like
#define MAC_RO1(string1, string2) "strings1string2"
If you feed MAC_RO1 like so
MAC_RO1(dir, file)
you get
"dirfile"
Can you accomplish anything similar with ANSI C? I guess what I'm
asking for is a preprocessor tutorial in respect to ANSI-C.
More information about the Comp.lang.c
mailing list