Ada, treelang needs to be converted to --enable-mapped-location

Richard Kenner
Thu Oct 7 12:57:00 GMT 2004

    If you can do this in a way that does not make the non-Ada case go 
    measuably slower, that seems OK.  If the indirection required is costly, 
    then your proposal is lessa ttractive.

It seems highly unlikely that changing a direct call to expand_location into
an indirect call via a lang hook would be a measurable difference given the
relative rarity of those calls.

    I think that if Ada wants to have its own source location machinery
    and its own diagnostic machinery, that's your business, so long as it
    doesn't impact the rest of the compiler adversely.  In the long run,
    having code that duplicates stuff that is common to the other front
    ends may lead to other problems for Ada, but I think that's up to the
    Ada maintainership to evaluate.

Right.  In my mind, the tradeoffs relate to the specialization of the code vs
the amount of code being shared and the issues are somewhat different between
diagnostic and source location machinery.  For the latter, there's simply not
enough code sharing going on to justify complicating the large existing
source file mechanisms in the Ada front end.

For diagnostic output, the major difference is in the other direction:
it is worth adding Ada-specific functionality to the existing
diagnostic code in order to enable it to be shared?  That's more a question
for the maintainers of the diagnostic machinery, though there is still the
issue of using code outside of the Ada tree in those cases when GCC is not
the backend since the current diagnostic code includes significantly more GCC
code than the source location machinery, as I understand it.

More information about the Gcc mailing list