Question about ANSI preprocessor

david.f.prosser dfp at cbnewsl.ATT.COM
Fri Sep 29 00:16:09 AEST 1989


In article <10879 at riks.csl.sony.co.jp> diamond at ws.sony.junet (Norman Diamond) writes:
>According to the ANSI standard, does the following code cause
>expansion of the preprocessor macro "huh"?
>
>#define huh(x) (abc + (x))
>y = huh
>#if 0
>	, a, lot, of, garbage
>#endif
>(z);

The invocation of a function-like macro requires that the next
preprocessing token after the macro name be the (.  Thus the
above example must produce the equivalent of

	y = huh (z);

after preprocessing.

Dave Prosser	...not an official X3J11 answer...



More information about the Comp.std.c mailing list