Question/proposal for USE_MAPPED_LOCATION and Ada

Giovanni Bajo
Thu Oct 7 16:01:00 GMT 2004

Richard Kenner wrote:

>     cp/error.c, print_instantiation_full_context and
>     print_instantiation_partial_context.
> So this is language-specific code, right, and not part of the
> line-map or language-independent diagnostic code?

Yes, and we could not use a language-independent version for C++, because we do
not dump *only* the line numbers of the instantiation context, but also the
declaration causing the instantiation. So we need a chain of DECLs in the first
place. An independent chain of locations only would be useless. What we
actually store is a chain of tinst_level_s structures (defined in
cp/cp-tree.h), where each node contains a declaration and a locus. I assume Ada
can be worked to do the same.

Giovanni Bajo

More information about the Gcc mailing list