goto, error: crosses initialization
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/2392655/what-are-the-sins-of-crosses-initialization">What are the sins of crosses initialization?</a>  </p>
</blockquote>



<p>Let's say I have some c++ code:</p>

<pre><code>if (error)
    goto exit;
... 
// size_t i = 0; //error
size_t i;
i = 0;
...
exit:
    ...
</code></pre>

<p>I understand we should not use <code>goto</code>, but still why does</p>

<pre><code>size_t i;
i = 0;
</code></pre>

<p>compile whereas <code>size_t i = 0;</code> doesn't?</p>

<p>EDIT: The question I had was why is such behavior enforced by the standard (mentioned by @SingerOfTheFall)?</p>
