On Mon, Sep 26, 2011 at 9:57 AM, Andrew MacLeod<amacleod@redhat.com> wrote:
The C++11 memory model asserts that a program containing data races
involving *non-atomic* variables has undefined semantics. The compiler is
not allowed to introduce any data races into an otherwise correct program.
C++11 specifies data races in terms of properties of the source code.
A conforming implementation may translate that code into something
that races on actual hardware if the race is benign _on that
hardware_. For example, it might read from a memory address that's
being written to concurrently if it knows that the write cannot
materially affect the value read. A user's C++ code that attempted to
do so would have undefined behavior, but the C++ compiler is
generating code for some more concrete platform that will likely have
a range of possible behaviors for such races.