This is the mail archive of the
mailing list for the libstdc++ project.
Re: Dealing with C++98/11 ABI incompatibilities
On 07/04/2012 09:41 AM, Richard Guenther wrote:
Btw, why use a bitmask? Isn't it enough to have a single number, viewed
as an ABI suffix?
Well, I think the question is whether we want to create a mechanism
which is only useful for libstdc++ versioning or one which is useful for
ABI changes in other libraries as well. A single number which applies
to the entire mangled name would be fine for just libstdc++, but I think
people would appreciate having a more general facility.
I was thinking of something like defining an ABI suffix for a name, so
that list would look like list__2 or some such in the mangled name. And
then a wrapper class would be wrapper__2. If the wrapper class also
contains a user class with an ABI suffix of "Boost2", then the wrapper
would look like wrapper__2__Boost2 or wrapper__Boost2__2, depending on
the order of the members. There would be no need to repeat a suffix
from something that is itself mangled, such as a function argument type
or a template argument, but we would need to propagate a suffix from the
return type of a (non-template) function or the type of a variable as
well as from member/base types in a class.