This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: 3.0 bogus file information in debugging output
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Carlo Wood <carlo at alinoe dot com>
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 3 Feb 2002 22:18:11 -0800
- Subject: Re: 3.0 bogus file information in debugging output
- References: <20020130205038.GJ754@codesourcery.com> <20020131061926.A7989@alinoe.com> <20020131072646.GV754@codesourcery.com> <20020131153115.A1739@alinoe.com> <20020201003443.GG23300@codesourcery.com> <20020201045304.A12019@alinoe.com>
On Fri, Feb 01, 2002 at 04:53:04AM +0100, Carlo Wood wrote:
> NOTICE : lines.cc:16
> NOTICE : foo.c:17
> NOTICE : bar.c:18
> (and the same result for stabs)
>
> I suppose that is right?
> I didn't know that the '#line' line didn't increment __LINE__.
> Otherwise I'd have expected:
> NOTICE : lines.cc:16
> NOTICE : foo.c:17
> NOTICE : bar.c:19
Yeah, that's right. #line sets the line number of the _next_ line. I
had forgotten this when I wrote the original -- the idea was to change
just the file name. I guess you can't do that. (The semantics here
make it easier to use #line for its normal purpose, i.e. what yacc
does with it.)
zw