integral location_t
Neil Booth
neil@daikokuya.co.uk
Wed Sep 24 22:10:00 GMT 2003
Per Bothner wrote:-
> >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.
I suggest making that -(n+1), where n is the index of the line map. This
gives easy lookup with a very small amount of special code.
Neil.
More information about the Gcc
mailing list