Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!pyramid!decwrl!spar!hunt From: hunt@spar.SPAR.SLB.COM (Neil Hunt) Newsgroups: comp.lang.c Subject: cpp bug Message-ID: <66@spar.SPAR.SLB.COM> Date: Wed, 18-Nov-87 20:49:35 EST Article-I.D.: spar.66 Posted: Wed Nov 18 20:49:35 1987 Date-Received: Sat, 21-Nov-87 12:01:57 EST Reply-To: hunt@spar.UUCP (Neil Hunt) Organization: SPAR - Schlumberger Palo Alto Research Lines: 37 The following fragment is the boiled down version of some lines from a C program which was automatically translated from pascal, and which breaks the cpp on my machine (a Sun 3, 3.2). % cat test.c #define l(a) 1 f() { l( a); l( a) } % /lib/cpp test.c # 1 "test.c" f() { 1; # 7 "test.c" 1 # 8 "test.c" } % Of course, the # 7 "test.c" should have been on a line on its own, not tagged onto the end of the previous line. The compiler complains about illegal characters and other problems !. It can be fixed by rearranging almost anything in the test fragment. The problem seems to be triggered by the occurrence of the start of an incomplete macro call on the same line as the end of the completion of another macro call. I would be very interested to know if anyone else's C cpp exhibits this problem ! Neil/.