translate-c: switch default should have an empty block not break

This commit is contained in:
Veikka Tuominen
2021-02-22 19:26:19 +02:00
parent ce9b3ee0f9
commit 011bc1b84f
2 changed files with 8 additions and 1 deletions
+1 -1
View File
@@ -2276,7 +2276,7 @@ fn transSwitch(
}
if (!has_default) {
const else_prong = try Tag.switch_else.create(c.arena, Tag.@"break".init());
const else_prong = try Tag.switch_else.create(c.arena, Tag.empty_block.init());
try cases.append(else_prong);
}