[c++] file numbering confusion

Neil Booth neil@daikokuya.demon.co.uk
Fri Mar 16 11:29:00 GMT 2001


Benjamin Kosnik wrote:-

> a ha. Thanks. Were you able to duplicate my confused gdb output then?

Yes.

> > Could you check cb_file_change in c-lex.c to confirm it's doing the right
> > thing with pushing and popping locations and assignment to front-end
> > global variables?
> 
> ...which FE global variables?

Things like input_file_stack, main_input_filename, input_filename.

Aaahhhh.... this looks like a #pragma GCC system_header thing (maybe).
Can you look at cb_file_change, with the case that fc->reason is
FC_RENAME?  This is when there is a #line in the source file, or
a #pragma GCC system_header.  The filename / line number may change
without entering or leaving a file.  I bet there is some special
casing needed for that, but I don't know the FE well enough to know
what.

Neil.



More information about the Gcc-bugs mailing list