[cxx-abi-dev] Deleted virtual functions

Mark Mitchell mark at codesourcery.com
Sun May 31 16:10:26 UTC 2009


Dennis Handly wrote:

> Not on my implementation where C and C++ calling conventions are the same.

Given the precedent set with __cxa_pure_virtual, I think we should just
stick with extern "C".  Having half a solution isn't really very
interesting.  If we care about implementations where C and C++ linkage
are incompatible, we should go through the document, find places where
that assumption shows, and add new entry points as necessary.  (We
cannot of course remove the existing functions, but we could add new
functions with C++ linkage.)

But, are there are at this point any implementations for which C and C++
linkage are incompatible in terms of calling conventions?  If this is
just a theoretical concern, then we should leave it alone; that the ABI
constrains new implementations which wish to follow the ABI is not an
inherent problem.

>> (Note that some implementations of __cxa_pure_virtual call fprintf, and
>> thereby drag in the whole I/O library; it's not just the cost of the
>> __cxa_pure_virtual function itself.)
> 
> I don't see this as an issue.  If there is a __cxa_pure_virtual that
> calls fprintf the cost is already paid?  At least in a shared lib
> implementation.

Yes -- but for small embedded systems there are no shared libraries.

> I assume the Standard says that if you manage to call that function, it's
> your tough luck?  ;-)

Yes.

> Are we going to explain that "may" in detail in the ABI so we don't have to
> have this mail exchange again?

We can ask Daveed if he will add a note to his drafting. :-)  If not, I
can add one.

-- 
Mark Mitchell
CodeSourcery
mark at codesourcery.com
(650) 331-3385 x713



More information about the cxx-abi-dev mailing list