integral location_t

Neil Booth neil@daikokuya.co.uk
Wed Sep 24 06:57:00 GMT 2003


Per Bothner wrote:-

> >*) ability to obtain a line-id corresponding to filename without line
> >number (whether this maps directly from line-id -> line_id or from
> >filename to line-id, I'm not sure, I suspect the former might be better).
> 
> Would being to have use "line number == 0" for any file work?  I don't
> know if that works.

Lineno == 0 is deliberately reserved.  It is possible of course to
assign special meanings to an arbitrary number of initial linenos.
However, it isn't possible to have lineno == 0 for a given file.  I'm
not sure what Nathan is referring to.

> >*) ability to create new line-id's 'off the end' of the main input file(s)
> >(so artificial functions such as static_initialization..., have unique
> >line numbers)
> 
> You can do that - you can call linemap_add at any time.

I'm not sure this would have the desired effect unless you call it at
the end of the file, and somehow mark the lines as special.

Neil.



More information about the Gcc mailing list