From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: ** X-Spam-Status: No, score=2.1 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY,PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,31c633ee5da73ed9 X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: Ada and C++; Any Gurus Out There? Date: 1999/06/03 Message-ID: <7j4lua$2rs$1@nnrp1.deja.com>#1/1 X-Deja-AN: 485066809 References: X-Http-Proxy: 1.0 x26.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Share what you know. Learn what you don't. X-Article-Creation-Date: Thu Jun 03 01:31:54 1999 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-06-03T00:00:00+00:00 List-Id: In article , gisle@apal.ii.uib.no (Gisle S�lensminde) wrote: > Using 'extern C' is not a workaround, but the intended > solution. No, that's not quite right, there *was* no "intended solution". Why not? Because at the time Ada 95 designed there was not officially standardized C++ language, so the Ada 95 standard could not address this particular issue. It is perfectly possible for an Ada 95 compiler to have built in knowlegde of such things as C++ mangling (after all it has to have detailed knowledge of how the Fortran, C, and COBOL compilers on a given target handle data). Also, using the extern C approach is quite limited, it does not for instance come close to allowing C classes to be passed transparently and treated as Ada 95 tagged types on the Ada side, something that the GNAT interface makes possible. Our approach in GNAT in providing a direct interface to C++ is to use the same data structures for tagged types as C++ uses for classes (the run-time library must be specialized to match a particular compiler). As far as name mangling goes, we leave that up to the binding generator tool, which knows the mangling scheme. In the absence of this tool, you have to figure out the mangling yourself (not impossible at all to do from the nm output). As I have noted before, ACT has long term plans to make this binding generator available, but we do not have any release data for this product (it is the binding generator that was used to generate all the SGI C++ bindings that come with the SGI Ada 95 product). Robert Dewar Ada Core Technologies Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.