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: C++ and Ada.


Robert Dewar wrote:
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).

If I import it as a normal ADA record I can't use constructors,right?


And there is no way of using CPP_Constructor with a non tagged type?

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.

Any timeline on this?


With this new pragma support will there be any work to eliminate the need for manually specifying C++ mangled symbol names? If that is possible.

Is this document available anywhere? Would be interesting to read of what will come.

Thanks in advance,
Daniel.


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