How can a pointer refer to a different type?
<blockquote>
  <p>(4.1/1) <strong>If the object to which the lvalue refers is not an object of
  type T and is not an object of a type derived from T</strong>, or if the object
  is uninitialized, a program that necessitates this conversion has
  undefined behavior.</p>
</blockquote>

<p>From this, I assume</p>

<pre><code>struct B {
     int x; };

B *p;
*p; //undefined behavior
</code></pre>

<p><code>*p</code> is a lvalue which refers to an uninitialized object. How can it refer to an object which is not the type of 'B' or its derived type? Am i misunderstanding something?</p>
