9fans archive / 1995 / 01 / 8 /    prev next

From: Hans-Peter Bischof bischof@bal...
Subject: macro expansion
Date: Sat, 14 Jan 1995 05:35:13 -0500

The program:
	% cat failed.c
	#include <u.h>
	#include <libc.h>

	#define x(p)    printf("Macro expansion %d\n", p );
	static void * Point() { int x; }
	main()  {}

The problem:
	Macros kc failed.c
	failed.c:7 syntax in macro expansion: x
	failed.c:8 syntax error, last name: x
	
The inexplicable:
	% cpp failed.c | kc -o failed.k
	% kl failed.k


Thanks for your help.

-hp