> It is a matter of faith, and usually misplaced at that, since volatile > isn't usually defined to place any constraints on the order in which > operations become visible to other processors. Certainly not in the C, C++, > or POSIX standards, although some platform ABIs do specify this to some > degree. > > Both POSIX and C++ are trying to deal with this, but it's an uphill battle > since processors differ widely on the sorts of constraints that they can > support efficiently. > > In the meantime, people sprinkle volatile around and pray. All the world's > an x86, right? > I think I'd be happier with new compiler pragmas in this case than a keyword. Then at least I KNOW that it can be ignored and will be optionally supported by compilers on a per-case basis. But then again, that's also true for "inline" in C++. It's just a suggestion, one that can be ignored. The compiler can also inline stuff I didn't ask it to. [C99 has inline now too doesn't it?]