barnett@vdsvax.steinmetz.ge.com (Bruce G. Barnett) (09/08/88)
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 <stdio.h
2 main()
3 {
4 crud=12g0;
5 }
csh> 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 <barnett@ge-crd.ARPA> <barnett@steinmetz.UUCP>
uunet!steinmetz!barnett