http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59215

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Oleg Smolsky from comment #0)
> in ...gcc/include/c++/4.8.x-google/x86_64-unknown-linux/bits/atomic_word.h
> 
>        typedef int _Atomic_word;
> 
> Should this be std::atomic<int> ?

No.


(In reply to Kostya Serebryany from comment #3)
> If that's via __sync_* or __atomic_* intrinsics, tsan will understand that. 

All ref-count updates are via __atomic built-ins.

> But only if you re-compile stdlibc++ with tsan, 

It's libstdc++ not stdlibc++, I don't know why everyone gets that wrong :-)

Anyway, this is already documented:
http://gcc.gnu.org/onlinedocs/libstdc++/manual/debug.html#debug.races

Reply via email to