preprocessor/2234: incorrect line numbers
Neil Booth
neil@daikokuya.demon.co.uk
Thu Mar 8 16:32:00 GMT 2001
Hi Gabriel,
If you have a look at the tm5.ii file attached to this bug report,
you'll find you can reproduce "the mystery of the diagnostic at
the wrong location" by compiling it (don't bother with the original
source code).
Then, if you try and cause a parser error by putting, in the preprocessed
file tm5.ii, a spurious token on the line
while (__extracted < __n)
[which is the true location of the error], or in the section corresponding
to basic_string.h [the reported location], that the parser shows the
correct line number in both cases.
This proves the C++ front end is aware of the correct line numbers.
I suspect the bug is either deep in the C++ front end, or more likely in
the diagnostic machinery. I'm almost certain it's not a bug in the
preprocessor. It could be a bug in c-lex.c, but I doubt that too.
Any ideas?
Neil.
More information about the Gcc-bugs
mailing list