Variable declaration in the switch head?
<p>While browsing the code of my friend I came to notice this:</p>

<pre><code>switch(State &amp;state = getState()) {
case Begin: state = Search; break;
// other stuff similar
}
</code></pre>

<p>What is with the variable in the switch header? He is using GCC so I think this might be a GCC extension. Any idea?</p>
