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) {
Unified · Split
| @@ -6094,7 +6094,7 @@ static void block(int *bsym, int *csym, int is_expr) · 6093 unmodified lines | |||
| 6094 | ++local_scope; | 6094 | ++local_scope; |
| 6095 | 6095 | ||
| 6096 | /* handle local labels declarations */ | 6096 | /* handle local labels declarations */ |
| 6097 | if (tok == TOK_LABEL) { | 6097 | while (tok == TOK_LABEL) { |
| 6098 | next(); | 6098 | next(); |
| 6099 | for(;;) { | 6099 | for(;;) { |
| 6100 | if (tok < TOK_UIDENT) | 6100 | if (tok < TOK_UIDENT) |