[cxx-abi-dev] Deleted virtual functions
Sean Perry
perry at ca.ibm.com
Mon Jun 1 13:46:41 UTC 2009
On zSeries (i.e. 390) the linkage for C and C++ are different. Identifying
all the places and providing solutions to the mixed linkage problems in the
document is a prereq to implementing the C++ABI in zSeries compilers.
--
Sean Perry
Compiler Development
IBM Canada Lab
(905)-413-6031 (tie 313-6031), fax (905)-413-4839
Mark Mitchell
<mark at codesourcer
y.com> To
Dennis Handly <dhandly at cup.hp.com>
05/31/09 12:10 PM cc
cxx-abi-dev at codesourcery.com
Subject
Re: [cxx-abi-dev] Deleted virtual
functions
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sourcerytools.com/pipermail/cxx-abi-dev/attachments/20090601/094ebf62/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
URL: <http://sourcerytools.com/pipermail/cxx-abi-dev/attachments/20090601/094ebf62/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pic25833.gif
Type: image/gif
Size: 1255 bytes
Desc: not available
URL: <http://sourcerytools.com/pipermail/cxx-abi-dev/attachments/20090601/094ebf62/attachment-0001.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ecblank.gif
Type: image/gif
Size: 45 bytes
Desc: not available
URL: <http://sourcerytools.com/pipermail/cxx-abi-dev/attachments/20090601/094ebf62/attachment-0002.gif>
More information about the cxx-abi-dev
mailing list