by StefanKarpinski · 12y ago · 0 comments
http://www.swag.uwaterloo.ca/acd/docs/ItaniumC++ABI.htm
Almost every major vendor has been working towards this for a long time now.Microsoft of course remains "special".
Regardless, the C++ standards committee did look at creating a portable C++ ABI in May 2014:
https://isocpp.org/blog/2014/05/n4028The problem with C++ ABIs is that C++ APIs tend to include much more substantial details in their headers. If you want to call a template or inline function, then you need a C++ compiler. Fundamentally, though, this is not any different from C macros -- a macro-heavy C API is going to require a C compiler to use.
Stdcall convention in C also often does some name mangling (leading underscore, trailing @ and the number of bytes on stack) but not always.
Also a C++ ABI would need to extend beyond simple calling conventions and also specify fixed behaviour of vtables, which i think compiler authors might balk at.
Or am I misusing terminology?
I really hope it makes it into the language. A stable API for external functions and whatever ABI you want for internal functions.
Or features are wrong? What's exactly wrong with this feature? Its improvement.