|
|
Subscribe / Log in / New account

Toward generic atomic operations

Toward generic atomic operations

Posted Aug 2, 2012 23:30 UTC (Thu) by nix (subscriber, #2304)
In reply to: Toward generic atomic operations by nix
Parent article: Toward generic atomic operations

Of course, this incompatibility is only apparent in the STL. So I suppose one could write a non-STL-using atomic-ops translation unit that just did atomic stuff and didn't go near the STL, then *just* compile *that* as C++11. It should link to C++98 stuff without any trouble, and the resulting binary should work even if the C++98 stuff uses the STL, as long as you don't specify C++11ness at link time.


to post comments

Toward generic atomic operations

Posted Aug 3, 2012 13:25 UTC (Fri) by jwakely (subscriber, #60262) [Link] (1 responses)

The std::list incompatibility has been reverted, so only GCC versions 4.7.0 and 4.7.1 are incompatible with other versions. The same releases had an ABI bug with passing std::pair, which has also been fixed now. There are some other differences still that result in (mostly harmless) ODR violations. The new plan is to implement custom attributes that affect name mangling to allow C++03/C++11 interoperability, see http://gcc.gnu.org/ml/gcc/2012-07/msg00100.html

Toward generic atomic operations

Posted Aug 4, 2012 11:58 UTC (Sat) by nix (subscriber, #2304) [Link]

Excellent news! The mangling change proposed in the mail you link to seems ever so much better than a silent ABI change.

(And, gosh, that's embarrassing: the revert, like the implemntation, was done by my own co-worker just last month and I didn't notice until I made a fool of myself in this thread. I must pay more attention!)


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