[RFC] C++1x breaking the ABI in one more place :(
Mark Mitchell
mark@codesourcery.com
Thu May 20 03:36:00 GMT 2010
Ian Lance Taylor wrote:
> Hmmm, that is true. Perhaps we need a way to include a version number
> in the symbol mangling.
There was a proposal at one point to implement HP's mangling algorithm
in G++. They had a method that did mangle version numbers all the way
through the symbols. But, here, I think you really want there to be
only one std::foo type in your program.
The problem is that in C++ much, much more is exposed to applications
than in C. That's also the benefit; you can do all this inlining and so
forth. But, in C your ABI is generally functions (which can be
versioned) and data structures (which are often pointers opaque to the
application). In C++, with so much of the library in header files, API
changes are much more likely to lead to ABI breakage.
> It appears that the C++ ABI committee unfortunately did not consider
> how to handle ABI changes over time.
I think we ought to just plan for an increment in the libstdc++.so
version number. We should do that when we think we have all the
ABI-breaking changes implemented. The world won't end if we don't
implement some C++1x changes until that point.
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713
More information about the Libstdc++
mailing list