Path: utzoo!attcan!uunet!steinmetz!vdsvax!barnett From: barnett@vdsvax.steinmetz.ge.com (Bruce G. Barnett) Newsgroups: comp.bugs.4bsd Subject: Problem with cpp: off by one line (#include Date: 8 Sep 88 02:13:35 GMT Reply-To: barnett@steinmetz.ge.com (Bruce G. Barnett) Organization: General Electric CRD, Schenectady, NY Lines: 26 I noticed the following bug that is reproducible on SunOS 3.X, SunOS 4.0, and Ultrix 2.0. Problem: cpp gets confused with missing ">" in include directive. The line numbers are off by one. Repeat by: csh> cat -n bug.c cat -n bug.c 1 #include cc -c bug.c cc -c bug.c "bug.c", line 5: crud undefined "bug.c", line 5: syntax error Note that cpp doesn't complain about the missing ">". Also the line number is off by one. -- Bruce G. Barnett uunet!steinmetz!barnett