LWN.net Logo

Day: GNOME OS

Day: GNOME OS

Posted Aug 10, 2012 15:44 UTC (Fri) by mathstuf (subscriber, #69389)
In reply to: Day: GNOME OS by slashdot
Parent article: Day: GNOME OS

The standard actually changed the ABI for std::string and std::list (possibly some others). The fix involves adding an attribute to help choose between the new and old ABI versions of classes. I can't find the blog link I read that on right now though.

From [1]:

> GCC versions 4.7.0 and 4.7.1 had changes to the C++ standard library which affected the ABI in C++11 mode: a data member was added to std::list changing its size and altering the definitions of some member functions, and std::pair's move constructor was non-trivial which altered the calling convention for functions with std::pair arguments or return types. The ABI incompatibilities have been fixed for GCC version 4.7.2 but as a result C++11 code compiled with GCC 4.7.0 or 4.7.1 may be incompatible with C++11 code compiled with different GCC versions and with C++98/C++03 code compiled with any version.

[1]http://gcc.gnu.org/gcc-4.7/changes.html


(Log in to post comments)

Day: GNOME OS

Posted Aug 10, 2012 15:58 UTC (Fri) by jwakely (subscriber, #60262) [Link]

> The standard actually changed the ABI

No. The standard doesn't mention an ABI.

Some implementations' std::string and std::list have always been compatible with the new requirements, so don't have to change.

So more accurately, the C++11 standard requires certain properties of std::string and std::list which are incompatible with GCC's existing implementations of those types.

> I can't find the blog link I read that on right now though.

Maybe you mean my comment that nix refers to in the grandparent post?

Day: GNOME OS

Posted Aug 10, 2012 16:08 UTC (Fri) by mathstuf (subscriber, #69389) [Link]

Ah, that makes more sense.

And yes, that blog post. Thanks :) .

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds