Subj : Re: Memory Barriers, Compiler Optimizations, etc. To : comp.programming.threads From : David Hopwood Date : Sun Feb 06 2005 04:58 am Neill Clift [MSFT] wrote: > "Alexander Terekhov" wrote: > >>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. If there is in fact any hardware device involved. -- David Hopwood .