1
0
Fork 0

Allow declarations in case statement

This now works:

 case 1:
    int z = 123;
    break;
This commit is contained in:
herman ten brugge 2024-01-16 07:51:56 +01:00
parent 04365dd4c9
commit bbe2e5a421
2 changed files with 3 additions and 2 deletions

View File

@ -7266,7 +7266,7 @@ again:
if (is_expr) {
vpop();
gexpr();
} else {
} else if (!decl(VT_JMP)) {
gexpr();
vpop();
}

View File

@ -14,7 +14,8 @@ int main()
break;
case 2:
printf("%d\n", 2);
int a = 2;
printf("%d\n", a);
break;
default: