title: Dereferencing an invalid pointer, then taking the address of the result
body: <p>Consider:</p>
  
  <pre><code>int* ptr = (int*)0xDEADBEEF;
  cout &lt;&lt; (void*)&amp;*ptr;
  </code></pre>
  
  <p>How illegal is the <code>*</code>, given that it's used in conjunction with an immediate <code>&amp;</code> and given that there are no overloaded <code>op&amp;</code>/<code>op*</code> in play?</p>
  
  <hr>
  
  <p>(This has particular ramifications for addressing a past-the-end array element <code>&amp;myArray[n]</code>, an expression which is explicitly equivalent to <code>&amp;*(myArray+n)</code>. <a href="https://stackoverflow.com/questions/988158/take-the-address-of-a-one-past-the-end-array-element-via-subscript-legal-by-the">This Q&amp;A</a> addresses the wider case but I don't feel that it ever really satisfied the above question.)</p>