The entire section of the switch is a single declaration context. You can't declare a variable in a case statement like that. Try this instead:
switch (val)
{
case VAL:
{
// This will work
int newVal = 42;
break;
}
case ANOTHER_VAL:
...
break;
}