Bug in "cpp" (4.2BSD, System V, ...? )

laman at sdcsvax.UUCP laman at sdcsvax.UUCP
Thu Sep 6 10:26:33 AEST 1984


Given the uninteresting macro definition:

#define		x()		y(a)

"Cpp" does NOT give an error message complaining about argument mismatching
for the following macro call:

	x(z);
	  ^
	  |
	opps!

Instead it expands to:

	y(a);

I think this is a bug.  "Cpp" is good about giving error messages for
mismatching arguments.  I don't think this as a feature.

Comments?  Fixes?

		Mike Laman, NCR @ Torrey Pines
		UUCP: {ucbvax,philabs,sdcsla}!sdcsvax!laman



More information about the Comp.lang.c mailing list