This is the mail archive of the
mailing list for the libstdc++ project.
Re: Dealing with C++98/11 ABI incompatibilities
- From: Jeffrey Yasskin <jyasskin at google dot com>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>
- Cc: Jason Merrill <jason at redhat dot com>, GCC <gcc at gcc dot gnu dot org>, "libstdc++" <libstdc++ at gcc dot gnu dot org>, Jakub Jelinek <jakub at redhat dot com>
- Date: Tue, 3 Jul 2012 14:30:54 -0700
- Subject: Re: Dealing with C++98/11 ABI incompatibilities
- References: <4FF3458A.firstname.lastname@example.org> <4FF34FE2.email@example.com>
On Tue, Jul 3, 2012 at 1:02 PM, Paolo Carlini <firstname.lastname@example.org> wrote:
> On 07/03/2012 09:18 PM, Jason Merrill wrote:
>> 2) Object layout changes to std::list and std::basic_string. ?For these
>> types, there is no way to both retain backward compatibility with older
>> C++98 code and conform to the C++11 standard. ?The best we can hope for is
>> to allow old code to coexist with new code so long as they don't try to
>> touch the same string/list objects.
> Just wanted to mention / record the case of std::time_get which has an
> additional virtual function (do_get) in C++11. I don't think it affects in
> important ways the points you are making.
It would be good to add this and anything else I missed to
http://gcc.gnu.org/wiki/Cxx11AbiCompatibility so there's one place
people can read to get the lay of the land.
At Google we found several libraries that had C-only interfaces, but
exposed C++ symbols from their implementations. Clearly it would be
better for them to just hide the symbols, but not all vendors have
enough build system expertise to do that. Jason's proposal to get the
conflicting names mangled differently for different language versions
would definitely help with the migration process.