diff --git a/tccgen.c b/tccgen.c index 602afa3fb..d5e9bf515 100644 --- a/tccgen.c +++ b/tccgen.c @@ -7266,7 +7266,7 @@ static void block(int is_expr) if (is_expr) { vpop(); gexpr(); - } else { + } else if (!decl(VT_JMP)) { gexpr(); vpop(); } diff --git a/tests/tests2/06_case.c b/tests/tests2/06_case.c index c0191e2b0..75b8d45d6 100644 --- a/tests/tests2/06_case.c +++ b/tests/tests2/06_case.c @@ -14,7 +14,8 @@ int main() break; case 2: - printf("%d\n", 2); + int a = 2; + printf("%d\n", a); break; default: