Subj : Re: Memory Barriers, Compiler Optimizations, etc. To : comp.programming.threads From : Neill Clift [MSFT] Date : Sat Feb 05 2005 03:28 pm "Alexander Terekhov" wrote in message news:420506AC.4D92C384@web.de... > > Same basis as with respect to preservation of sequence of std IO > calls to dev/null (with destination known in advance so to speak). > The thing is that C/C++ volatile abuse isn't really "observable > behavior" under single-threaded C/C++ standard(s), you know. > In section 6.5.3 of the ANSI C standard as a footnote it says: 'A volatile declaration may be used to describe an object corresponding to a memory-mapped input/output port...' So compiler reordering would be visable via it's effect on a hardware device. I got this by looking in Mr Schildt's book :-) Neill. .