ANSI C Question

herndon at umn-cs.UUCP herndon at umn-cs.UUCP
Sat Mar 9 05:44:00 AEST 1985


  If the ANSI standard allows spaces between the name of macro and
the parenthesis introducing the parameter list, how is the pre-processor
supposed to disinguish between:

#define NULLMACRO (x, y, z)  /* 3 param macro expands to nothing at all */

and 

#define XYZMACRO (x, y, z)   /* 0 param macro expands to "(x, y, z)" */

Maybe quote interpretation rules will come into play, but these don't
exist now, and will probably break many existing programs.  What does
the standard claim, or has it ignored this?  This "no spaces between
macro name and parenthesis introducing parameter list" restriction also
occurs in the 'm4' macro processor, I suspect for good reason.


					Robert Herndon
					...!ihnp4!umn-cs!herndon



More information about the Comp.lang.c mailing list