C is not Swift. You’ll be happier if you structure your switch
statements using curly braces round all of the cases interiors, like this:
switch (tag) { case 1: { // curly braces // ... break; } case 2: { // curly braces // ... break; } case 3: { // curly braces // ... break; } }
The extra level of curly braces allows you to do things you can’t do otherwise.