[PATCH][RFC] Remove volatile from data members in libstdc++

Joe Buck Joe.Buck@synopsys.COM
Sat Jul 15 00:31:00 GMT 2006


On Fri, Jul 14, 2006 at 05:00:53PM -0700, Boehm, Hans wrote:
> Clearly, according to language standards, ordinary loads do not
> guarantee atomicity.  A compiler that always load an int in two halves
> is clearly standard conforming, according to current standards.
> Hopefully you agree?

No, this is incorrect on platforms that define the sig_atomic_t typedef
as int, as many do.  See

http://www.delorie.com/gnu/docs/glibc/libc_496.html

"In practice, you can assume that int and other integer types no longer
than int are atomic. You can also assume that pointer types are atomic;
that is very convenient. Both of these assumptions are true on all of the
machines that the GNU C library supports and on all POSIX systems we know
of."



More information about the Libstdc++ mailing list