Tom-
I have studied this manual (though not in great detail) and while I saw plenty of pragmas for controlling optimizations for a region of code, I saw nothing that appeared to give the semantics that I described.
The reason that I'm asking for this is that correct and portable lock primitives cannot be built without proper optimization barriers. I'm not saying that CW at present generates incorrect object code, but rather that "future proof" synchronization constructs cannot be built without some sort of code/value motion guarantee provided by the compiler. Volatile alone does not provide sufficient guarantees (at least in C89).
If, after looking at the manual more closely, I cannot find what I want, would it be reasonable to file a feature request with the compiler team?
Thanks.