Subj : Re: Memory Barriers, Compiler Optimizations, etc. To : comp.programming.threads From : David Schwartz Date : Tue Feb 08 2005 12:27 pm "Ziv Caspi" wrote in message news:cu2548$189$3@news2.netvision.net.il... > In any case, C/C++ provides no mechanism to prevent the processor itself > from reordering, so even if you belong to the first group, you get no > standard guarantees. I can't believe it! How can you possibly argue that the C/C++ standard imposes requirements on the *compiler* that the *processor* is free to violate and still comply with the standard? That's utterly absurd. If the compiler can't generate code that prevents the processor from violating the C/C++ standard, the compiler does not conform. Period. > Note that the guarantees we currently provide hold only for the platforms > Windows and CL run on -- x86, x64, and Itanium. We currently don't provide > a guaranteed "future-proof" model for future platforms, although some of > us would really like us to do so... In other words, it is *not* the official position that the C/C++ standard requires such things. DS .