Path: utzoo!utgpu!watmath!clyde!ima!cfisun!lakart!dg
From: dg@lakart.UUCP (David Goodenough)
Newsgroups: comp.lang.c
Subject: Re: how widespread is this cpp bug?
Message-ID: <368@lakart.UUCP>
Date: 2 Dec 88 21:53:00 GMT
References: <9026@smoke.BRL.MIL>
Organization: Lakart Corporation, Newton, MA
Lines: 41

From article <9026@smoke.BRL.MIL>, by gwyn@smoke.BRL.MIL (Doug Gwyn ):
> In article <6625@csli.STANFORD.EDU> wagner@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.

% cat snark.c:
#define	proc()	proc

#define	grunt(baz)	proc()baz

main()
 {
    grunt(snarf);
 }

%cc -E snark.c
# 1 "snark.c"

main()
 {
    		procsnarf;
 }

%
Works for me.

Now, how it's used is open to discussion: I have seen it used when grunt()
becomes a procedure like macro that actually is a template for generating
a lot of copies of a structure.

Just out of idle curiosity, what is a Reiser-base preprocessor?
-- 
	dg@lakart.UUCP - David Goodenough		+---+
							| +-+-+
	....... !harvard!xait!lakart!dg			+-+-+ |
AKA:	dg%lakart.uucp@harvard.harvard.edu	  	  +---+