C++ and Ada.
Robert Dewar
dewar@gnat.com
Sat Oct 2 20:50:00 GMT 2004
Daniel Lundqvist wrote:
> Hi,
>
> I've been toying around with Ada lately. Trying to add Ada bindings to a
> C++ library. Almost everything works perfect except one thing.
> I can't seem to import classes without virtual tables.
>
> Pragma CPP_Constructor seem to require tagged types. And if I mark the
> type tagged Pragma CPP_Class needs it to have a Vtable_Ptr field. But
> then gnats idea of how class looks like isn't correct.
Right, with the current implementation, you can't import a class without
a virtual table as a tagged type (you could of course import it as a
normal Ada record).
As it turns out, we are starting to take another look at the whole
CPP pragma support, with an eye also on the new Interfaces feature
of Ada 95. We are preparing an initial discussion document on an
implementation approach for Interfaces, which we will post on this
list for discussion when it is ready. Our initial thought is to try
to make the implementation of Interfaces as compatible as possible
with the g++ MI model.
More information about the Gcc
mailing list