integral location_t

Per Bothner per@bothner.com
Wed Sep 24 07:31:00 GMT 2003


Neil Booth wrote:
> 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.

(fileline) 0 is specifically reserved.  Can we create a fileline
for an arbitrary filename, with a line number of 0?  This could be
used fo "unknown" or "whole file" or "line number not applicable".

If the current implementation can't support this, it is always
possible to modify the implementation to do so, by always incrementing
the line numbers before you enter them in the linemap tables.
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/




More information about the Gcc mailing list