This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 3.0 bogus file information in debugging output


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]