mescc: Tinycc support: multiple statements in default case.
* module/language/c99/compiler.mes (clause->info): Support multiple statements in default case.
This commit is contained in:
parent
a7a3de05f6
commit
4ec2532ad5
|
@ -1295,6 +1295,8 @@
|
|||
(loop statement (append cases (list (test->text test))) clause))
|
||||
((default ,statement)
|
||||
(loop statement cases clause))
|
||||
((default . ,statements)
|
||||
(loop `(compd-stmt (block-item-list ,@statements)) cases clause))
|
||||
((compd-stmt (block-item-list))
|
||||
(loop '() cases clause))
|
||||
((compd-stmt (block-item-list . ,elements))
|
||||
|
|
|
@ -51,6 +51,7 @@ swits (int c)
|
|||
x = 1;
|
||||
break;
|
||||
default:
|
||||
x = 2;
|
||||
x = 2;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue