| @@ -7205,7 +7205,7 @@ again: · 7204 unmodified lines |
| 7205 | 7205 | label_push(&local_label_stack, tok, LABEL_DECLARED); |
| 7206 | 7206 | next(); |
| 7207 | 7207 | } while (tok == ','); |
| 7208 | | − skip(';'); |
| 7208 | + if (tok == ';') next(); |
| 7209 | 7209 | } |
| 7210 | 7210 | |
| 7211 | 7211 | while (tok != '}') { |
| @@ -7241,7 +7241,7 @@ again: · 29 unmodified lines |
| 7241 | 7241 | leave_scope(root_scope); |
| 7242 | 7242 | if (b) |
| 7243 | 7243 | gfunc_return(&func_vt); |
| 7244 | | − skip(';'); |
| 7244 | + if (tok == ';') next(); |
| 7245 | 7245 | /* jump unless last stmt in top-level block */ |
| 7246 | 7246 | if (tok != '}' || local_scope != 1) |
| 7247 | 7247 | rsym = gjmp(rsym); |
| @@ -7258,7 +7258,7 @@ again: · 10 unmodified lines |
| 7258 | 7258 | else |
| 7259 | 7259 | leave_scope(loop_scope); |
| 7260 | 7260 | *cur_scope->bsym = gjmp(*cur_scope->bsym); |
| 7261 | | − skip(';'); |
| 7261 | + if (tok == ';') next(); |
| 7262 | 7262 | |
| 7263 | 7263 | } else if (t == TOK_CONTINUE) { |
| 7264 | 7264 | /* compute jump */ |
| @@ -7266,7 +7266,7 @@ again: · 1 unmodified line |
| 7266 | 7266 | tcc_error("cannot continue"); |
| 7267 | 7267 | leave_scope(loop_scope); |
| 7268 | 7268 | *cur_scope->csym = gjmp(*cur_scope->csym); |
| 7269 | | − skip(';'); |
| 7269 | + if (tok == ';') next(); |
| 7270 | 7270 | |
| 7271 | 7271 | } else if (t == TOK_FOR) { |
| 7272 | 7272 | new_scope(&o); |
| @@ -7314,7 +7314,7 @@ again: · 41 unmodified lines |
| 7314 | 7314 | gexpr(); |
| 7315 | 7315 | c = gvtst(0, 0); |
| 7316 | 7316 | skip(')'); |
| 7317 | | − skip(';'); |
| 7317 | + if (tok == ';') next(); |
| 7318 | 7318 | gsym_addr(c, d); |
| 7319 | 7319 | gsym(a); |
| 7320 | 7320 | prev_scope_s(&o); |
| @@ -7426,7 +7426,7 @@ again: · 105 unmodified lines |
| 7426 | 7426 | } else { |
| 7427 | 7427 | expect("label identifier"); |
| 7428 | 7428 | } |
| 7429 | | − skip(';'); |
| 7429 | + if (tok == ';') next(); |
| 7430 | 7430 | |
| 7431 | 7431 | } else if (t == TOK_ASM1 || t == TOK_ASM2 || t == TOK_ASM3) { |
| 7432 | 7432 | asm_instr(); |
| @@ -7481,7 +7481,7 @@ again: · 48 unmodified lines |
| 7481 | 7481 | gexpr(); |
| 7482 | 7482 | vpop(); |
| 7483 | 7483 | } |
| 7484 | | − skip(';'); |
| 7484 | + if (tok == ';') next(); |
| 7485 | 7485 | } |
| 7486 | 7486 | } |
| 7487 | 7487 | } |
| @@ -8637,7 +8637,7 @@ static void do_Static_assert(void) · 1149 unmodified lines |
| 8637 | 8637 | skip(')'); |
| 8638 | 8638 | if (c == 0) |
| 8639 | 8639 | tcc_error("%s", msg); |
| 8640 | | − skip(';'); |
| 8640 | + if (tok == ';') next(); |
| 8641 | 8641 | } |
| 8642 | 8642 | |
| 8643 | 8643 | #ifdef TCC_TARGET_PE |
| @@ -8718,6 +8718,10 @@ static int decl(int l) · 74 unmodified lines |
| 8718 | 8718 | return 1; |
| 8719 | 8719 | next(); |
| 8720 | 8720 | continue; |
| 8721 | + } else if (l != VT_JMP && l != VT_CMP) { |
| 8722 | + /* no semicolon - let caller handle it */ |
| 8723 | + } else { |
| 8724 | + expect(";"); |
| 8721 | 8725 | } |
| 8722 | 8726 | |
| 8723 | 8727 | while (1) { /* iterate thru each declaration */ |
| @@ -8904,7 +8908,7 @@ static int decl(int l) · 180 unmodified lines |
| 8904 | 8908 | if (tok != ',') { |
| 8905 | 8909 | if (l == VT_JMP) |
| 8906 | 8910 | return has_init ? v : 1; |
| 8907 | | − skip(';'); |
| 8911 | + if (tok == ';') next(); |
| 8908 | 8912 | break; |
| 8909 | 8913 | } |
| 8910 | 8914 | next(); |