This is the mail archive of the
mailing list for the GCC project.
Re: libstdc++ c++98 & c++11 ABI incompatibility
On Mon, Jul 2, 2012 at 7:00 PM, Jonathan Wakely <firstname.lastname@example.org> wrote:
> On 2 July 2012 17:43, Jeff Law <email@example.com> wrote:
>> On 07/02/2012 10:26 AM, Michael Meeks wrote:
>>> On Thu, 2012-06-14 at 15:14 +0200, Matthias Klose wrote:
>>>> While PR53646 claims that c++98 and c++11 should be ABI
>>>> compatible (modulo bugs), the addition of the _M_size member
>>>> to std::_List_base::_List_impl makes libraries using
>>>> std::list in headers incompatible
>>> This is pretty nasty for LibreOffice (and no doubt others). We
>>> can, and
>>> often do depend on rather a number of system C++ libraries and at a very
>>> minimum, having no simple way to detect which C++ ABI we have to build
>>> against 'old' vs. 'new' - is profoundly unpleasant.
>>> Is there no chance of having a bug fix that is a revision of the
>>> (unintended?) ABI breakage in this compiler series ?
>> That's the direction I'd prefer to see (reversion until we're ready to make
>> the wholesale ABI changes). Not sure what the libstdc++ maintainers are
>> thinking right now.
> I'm wondering why the libstdc++ list was taken out of the CC list ;-)
> I don't know what the others think but rather than just reverting it
>From a RM point of view please go ahead and revert unintended ABI
breakage on all affected branches. Add an entry to the respective
changes file to warn users about the incompatibility present on branches.
> I'd like to see inline namespaces used so that in C++11 mode std::list
> refers to (for example) std::__2011::list, which has the additional
> member. That wouldn't link to C++03's std::list.
That means that C++03 std::list cannot interface with C++11 std::list
even within the v6 ABI, right? That sounds not very much better
than the broken ABI we have right now (unless you suggest people
that want the C++11 std::list would have to use std::__2011::list and
otherwise would get the C++03 std::list even with -std=c++11?).