One interesting thing to consider here is how the C++ semantics compares with that of pragma Volatile in Ada, which is roughly intended to be equivalent to volatile in C.