title: Does this paragraph allow an implementation to optimize out volatile accesses in C?
body: <p>The C Standard says</p>
  
  <blockquote>
    <p>An actual implementation need not evaluate part of an expression if it can deduce that its value is not used and that no needed side effects are produced (including any caused by calling a function or accessing a volatile object)</p>
  </blockquote>
  
  <p>When is a <code>volatile</code> variable not needed? According to this paragraph, <code>volatile</code> appears to become subject to the as-if rule just like any other non-<code>volatile</code> object.</p>
  
  <hr>
  
  <p>The answers given in the non-duplicate linked question are not helpful to me as they do not address the above quoted paragraph</p>
  
  <ul>
  <li>When is a value considered to be "used"? It appears to be different than "reading the value from an object" because the corresponding access can be omitted, according to the above quote.</li>
  <li>What is a "needed side effect"?</li>
  </ul>
  
  <p>Refer to the comments below.</p>