c/8927: Gcc give error for wrong line of C code.
Sat Feb 15 21:56:00 GMT 2003
The same problem happens for g++, so this is not a C bug.
c_lex() and c-parse.in:_yylex() return the right line number for the
token. But bison looks ahead a bit and that causes the line number to
advance as well. This is also why saving the line number in the
"primary" production doesn't help: Before we parse primary:IDENTIFIER,
we've already advanced the line number.
So my guess is that this is a cpplib bug: It should not advance the line
number until the previous token is accepted. Dunno how to attack this
More information about the Gcc-bugs