This is the mail archive of the gcc@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: integral location_t


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.


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