On 6/5/07, Aaron Gray <[EMAIL PROTECTED]> wrote:
MS Visual Studio does not parse it. Are you sure its legal C ?
Yes I am. Try this: int f(int a) { switch (a) { case 1: { int b = 2; break; case 2: break; } } } This is valid C90 and C99, though invalid C++98. If you are using visual studio, make sure it is being compiled as C and not C++. C++ is not a true superset of C; anyone who thinks needs to tell their CS teacher (or book author) that they are wrong and they should relearn about the two languages. Thanks, Andrew Pinski