Quote:
If what I have read it true, then in the example you give above, the underlying object being referenced should be declared as volatile. If it is not, then regardless of the casts used on the pointers, the compiler is free to treat the variable as non-volatile, because it actually knows that it is. If it declared as non-volatile, but is expected to behave as volatile because the pointer used is volatile, a mistake has been made, for the Standard does not say this will happen - rather, it says if the compiler knows the type of the underlying object, it uses that type.
Too many typos. Tired!