...
The assignment ipp = &ip
is unsafe because it would allow the following valid code to reference the value of the volatile object i
through the non-volatile qualified reference ip
. In this example, the compiler may optimize out the entire if block because there it is not possible that i =!= 0
if i
is not volatile.
Implementation Specific Details
...