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:
parent
3f05d88d5b
commit
51f6e52dd3
1 changed files with 1 additions and 1 deletions
2
tccgen.c
2
tccgen.c
|
|
@ -6094,7 +6094,7 @@ static void block(int *bsym, int *csym, int is_expr)
|
||||||
++local_scope;
|
++local_scope;
|
||||||
|
|
||||||
/* handle local labels declarations */
|
/* handle local labels declarations */
|
||||||
if (tok == TOK_LABEL) {
|
while (tok == TOK_LABEL) {
|
||||||
next();
|
next();
|
||||||
for(;;) {
|
for(;;) {
|
||||||
if (tok < TOK_UIDENT)
|
if (tok < TOK_UIDENT)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue