title: How can a variable be used when its definition is bypassed?
body: <p>In my mind, always, definition means storage allocation. </p>
  
  <p>In the following code, <code>int i</code> allocates a 4-byte (typically) storage on program stack and bind it to <code>i</code>, and <code>i = 3</code> assigns 3 to that storage. But because of <code>goto</code>, definition is bypassed which means there is no storage allocated for <code>i</code>.</p>
  
  <p>I heard that local variables are allocated either at the entry of the function (<code>f()</code> in this case) where they reside, or at the point of definition.</p>
  
  <p><em>But either way, how can <code>i</code> be used while it hasn't been defined yet (no storage at all)? Where does the value three assigned to when executing <code>i = 3</code>?</em></p>
  
  <pre><code>void f()
  {
      goto label;
      int i;
  
  label:
      i = 3;
      cout &lt;&lt; i &lt;&lt; endl; //prints 3 successfully
  }
  </code></pre>