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: Question/proposal for USE_MAPPED_LOCATION and Ada


Steven Bosscher wrote:

I don't think having your own location representation is a waste of
space and time.  Zack likes clean, I'm more pragmatic: It's a design
decision.

One thing to be aware of in the Ada case is the requirement for properly tracking the distinction between a generic template and its instantiations, to all depths of instantiation. In the GNAT front end, a 32-bit source location is sufficient to record both the source location in the generic template and the source location of all instantiations. This is quite important for getting good error message placement. Source location here = line/column.

In the Fortran case, the question is: Does GCC provide adequate language independent diagnostics machinery? (A: apparently yes, and with a little luck we'll even get column information back!). In your case, the question is: Do you want our front end to depend on linemap.[ch] outside gigi? If not, then implement your own location representation, translate your representation to that of GCC, accept the space and time penalty, and be done with it.

It's probably not that big a penalty I would guess, though, as above, I would guess this is a "lossy" translation, and that the gcc messages won't know about instantiations.


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