Support multiple __label__ declarations

Support multiple __label__ declarations at the beginning of a block
as long as they're contiguous.

gcc and clang accept:
    { __label__ a,b; __label__ c;  /*...*/ }
.
Tcc would fail it. This patch makes it accept it.

The patch:
-        if (tok == TOK_LABEL) {
+        while (tok == TOK_LABEL) {
This commit is contained in:
Petr Skocik 2019-01-09 18:20:15 +01:00 committed by Pursuer
parent 3f05d88d5b
commit 51f6e52dd3

View file

@ -6094,7 +6094,7 @@ static void block(int *bsym, int *csym, int is_expr)
++local_scope;
/* handle local labels declarations */
if (tok == TOK_LABEL) {
while (tok == TOK_LABEL) {
next();
for(;;) {
if (tok < TOK_UIDENT)