This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: [3.0 regression] File naming confusion
- To: Benjamin Kosnik <bkoz at redhat dot com>
- Subject: Re: [3.0 regression] File naming confusion
- From: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Date: Thu, 24 May 2001 22:43:21 +0100
- Cc: gcc-bugs at gcc dot gnu dot org
- References: <20010524075954.A16875@daikokuya.demon.co.uk>
Neil Booth wrote:-
> Many moons ago, Benjamin Kosnik wrote:-
>
> > I keep dropping the ball WRT the line-numbering issue. Here's a
> > small example:
>
> Here's a *really easy* testcase. We MUST get this fixed for 3.0.
>
> #line 500 "foo.c"
> int
> main ()
> {
> return 0;
> }
Well, I can fix this with the patch below, but not your C++ testcase.
I suspect that both have the same (correct) fix. I've looked into
this as much as I can; someone who understands debug output, and the
global variables it depends on (because that *is* where the bug is,
I'm convinced) needs to look at this. I've given enough clues as to
what is causing it.
I will enter a bug report as high priority.
Neil.
Index: c-lex.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-lex.c,v
retrieving revision 1.141
diff -u -p -r1.141 c-lex.c
--- c-lex.c 2001/05/23 19:05:37 1.141
+++ c-lex.c 2001/05/24 07:23:24
@@ -292,6 +292,8 @@ cb_file_change (pfile, fc)
else
error ("leaving more files than we entered");
}
+ else
+ input_file_stack->name = fc->to.filename;
update_header_times (fc->to.filename);
in_system_header = fc->sysp != 0;