Oh, no problem then :-)

Actually, there is nothing like a "case" block. It's only the "swtich" block (scope). So all variables declared inside a switch and not nested in deeper scopes are in scope at any label. From the implementation point of view, switch is actually a "multi goto". These case marks are _really_ labels like the ones you could jump to with `goto`. Thus, the same rules apply for `goto` and `switch`.

To get around that, see this:

~~~
switch (x) {
case 1:
  { // <-- creates a new scope
    int i = foo();
    if (i > 100 ) return;
    break;
  } // <-- closes the scope, "i" is now no longer in scope
case 2:
    int i = foo();
    if (i > 100 ) return;
    break;
    // "i" is still in scope. If switch() ends here, everything's fine.
    // If switch doesn't end here, compiler will warn or error out because of uninitialized variable i.
case 3: // at least a warning here.
}
~~~