This is the mail archive of the
mailing list for the libstdc++ project.
Re: basic_string atomicity
On Fri, Jan 6, 2012 at 8:12 PM, Jonathan Wakely <firstname.lastname@example.org> wrote:
> On 6 January 2012 14:34, David Edelsohn wrote:
>> Unfortunately the changes to __sync_fetch_and_add because of the C++11
>> memory model changes to GCC ALREADY HAVE CAUSED A REGRESSION that
>> affects libstdc++. ?G++ now produces worse code, at least for
>> architectures that can make a distinction among the various memory
> We probably want to CC Andrew and Aldy here, as I can't speak for the
> other libstdc++ maintainers but personally I usually try not to touch
> the existing code using atomic ops unless they're broken, and even
> then I prefer to ask an expert!
> Andrew, Aldy, please see
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51766 for the sync vs
> lwsync change, and the thread starting at
I agree that we need to change std::string implementation for C++11
to move away from refcounting.
I also think that we need to unbreak libstdc++ on powerpc.
Hence I am leaning towards David's patch. The real question
is whether it does harm on other architectures that are less
"fine grained" than power.