integral location_t

Nathan Sidwell nathan@codesourcery.com
Tue Sep 23 09:09:00 GMT 2003


Richard Henderson wrote:
> On Mon, Sep 22, 2003 at 08:56:41AM +0100, Nathan Sidwell 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).
> What purpose does this serve?
I recall a usefulness somewhere. Ah, in cp/decl.c, pop_label. It can
be changed to refer to the start of the current function or something.
Scratch this requirement.


>>*) 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)
> Since the library won't have any notion of how many lines
> are in the input files, it won't know what's off the end.
mm, I thought the line map stuff had a concept of greatest line number
reached

>>*) the ability to map a line-id to a translation unit might already be
>>needed for the multiple-translation unit mode, and probably would be when
>>C++'s export is implemented
> What purpose does this serve?  I don't even know what mapping
> line-id to "translation unit" means.
This is possible a front-end thing. I thought the multiple TU mode
checked the ODR and would need to indicate TU's in the error messages.
I know the Edison Design Group C++ FE does that.  However, such problems
concern declarations, so something could be done with them, rather than
all line-id's.  Given that we both are not entirely sure what this means,
I guess it'd be bad to implement it!

nathan

-- 
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
          The voices in my head said this was stupid too
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk




More information about the Gcc mailing list