[
Note 5:
volatile is a hint to the implementation to avoid aggressive
optimization involving the object because it is possible for the value of the object
to change by means undetectable by an implementation
. Furthermore, for some implementations,
volatile can indicate that
special hardware instructions are needed to access the object
. In general, the
semantics of
volatile are intended to be the same in C++ as
they are in C
. —
end note]