This is the mail archive of the gcc-patches@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]

Ada: revive support for C++ interfacing


Tested on x86-linux

This patch is a small initial step towards reviving the currently
defunct GNAT C++ support pragmas. It makes a simple layout change
in the type VTable in Interfaces.CPP to reflect the new C++ ABI,
which locates the method table part of the vtable at a zero word
offset from the vtable address point, rather than at a two word
offset as was previously assumed.

Missing from this patch is a mechanism for manipulating the
typeinfo * / TSD slot of the vtable, since doing so requires some
additional work in the front end to ensure that GNAT builds a
dispatch table addressable at negative offsets from the address
point when extending from a C++ class. Further work is anticipated
at some point in the future, but for now this change restores the
bulk of the broken functionality

For now, a TSD slot is simply moved out of the way of the dispatch
table, as is done in the case of i-cpp-vms.adb.

There is a test case and a test.cmd available under DA01-016.

2004-10-26  Matthew Gingell  <gingell@gnat.com>

	* i-cpp.ads, i-cpp.adb: Change layout of VTable for new C++ ABI.

Attachment: difs.18
Description: Text document


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