[cxx-abi-dev] function pointer linkage for __cxa_vec_new, etc.

Mark Mitchell mark at codesourcery.com
Wed Nov 6 18:27:27 UTC 2002



--On Tuesday, November 05, 2002 12:50:40 PM +0100 "Martin v. Löwis" <loewis at informatik.hu-berlin.de> wrote:

> scott douglass <sdouglass at arm.com> writes:
>
>> The declarations of __cxa_vec_new, etc. given in section 3.3.3
>> (inadvertantly) make the function pointer parameters
>> (i.e. constructor, destructor, alloc and dealloc) pointers to "C"
>> functions.  Is suspect that these function pointer parameters want
>> to be pointers to "C++" functions not pointer to "C" functions.
>
> While this seems to be the case, this does not have any effect on the
> ABI, does it?
>
> Also, "pointer-to-constructor" does not exist in C++, so making it a
> C++ function pointer expecting this still won't make type-compatible
> with the constructor entry point.

I agree.

There is an assumption in the ABI (one that should probably be stated
explicitly somewhere) that C and C++ functions have the same calling
conventions and so forth.

-- Mark Mitchell                mark at codesourcery.com
CodeSourcery, LLC            http://www.codesourcery.com



More information about the cxx-abi-dev mailing list