* Bart Van Assche: > On 10/27/07, Florian Weimer <[EMAIL PROTECTED]> wrote: > >> And this isn't really specific to threads. > > Hello Florian, > > What I was trying to explain is that it is not necessary to declare > shared variables volatile, not for any C/C++ compiler that is > compliant with the language standard.
The point of this thread is that a compliant compiler can turn loads into stores if the object is not volatile at the point of the load. Anyway, not reordering across function calls is not sufficient to get sane threading semantics (IIRC, this is also explained in detail in Hans Boehm's paper).