The MSDN docs for “volatile” in Visual C ++ indicate that records have “release semantics” and that reading has “acquire semantics”, in addition to the fact that reads are always read from memory and that records are always written accordingly.
The C specification for "volatile" includes the second part (don't do crazy optimizations), but not the first part (memory pickup).
Is there any way in Visual C ++ to get only mutable "C" behavior, without taking memory?
I want the variable to always be on the stack in a fixed place, but I don’t want to take the overhead of taking the memory at each assignment to it.
Is there an easy way to do this using a Visual C ++ source?
c ++ volatile visual-c ++
Scott Wisniewski
source share