This optimization exists for a reason. With macros, operator overloading or templates it&#x27;s very easy to generate code like this:<p><pre><code>  if (!p) { return -1; } else { do something; }
  if (!p) { return -1; } else { do something else; }
  if (!p) { return -1; } else { do even more; }
  ...
</code></pre>
And now, you <i>want</i> the compiler to remove all these redundant checks.<p>Moreover, you very likely <i>don&#x27;t</i> want warnings here.