From 51f6e52dd3ee73b03e8dbad3a62fbf0767543a8e Mon Sep 17 00:00:00 2001 From: Petr Skocik Date: Wed, 9 Jan 2019 18:20:15 +0100 Subject: [PATCH] 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) { --- tccgen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tccgen.c b/tccgen.c index 46a13971..06af3858 100644 --- a/tccgen.c +++ b/tccgen.c @@ -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)