Unified · Split
| @@ -4342,11 +4342,14 @@ static void block(int *bsym, int *csym, int *case_sym, int *def_sym, · 4341 unmodified lines | ||
| 4342 | 4342 | gsym_addr(b, d); |
| 4343 | 4343 | } else if (tok == '{') { |
| 4344 | 4344 | Sym *llabel; |
| 4345 | + SValue *pvtop; | |
| 4345 | 4346 | |
| 4346 | 4347 | next(); |
| 4347 | 4348 | /* record local declaration stack position */ |
| 4348 | 4349 | s = local_stack; |
| 4349 | 4350 | llabel = local_label_stack; |
| 4351 | + /* record vstack position */ | |
| 4352 | + pvtop = vtop; | |
| 4350 | 4353 | /* handle local labels declarations */ |
| 4351 | 4354 | if (tok == TOK_LABEL) { |
| 4352 | 4355 | next(); |
| @@ -4373,6 +4376,8 @@ static void block(int *bsym, int *csym, int *case_sym, int *def_sym, · 20 unmodified lines | ||
| 4373 | 4376 | } |
| 4374 | 4377 | /* pop locally defined labels */ |
| 4375 | 4378 | label_pop(&local_label_stack, llabel); |
| 4379 | + /* pop left-over VLA size expressions */ | |
| 4380 | + vtop = pvtop; | |
| 4376 | 4381 | /* pop locally defined symbols */ |
| 4377 | 4382 | if(is_expr) { |
| 4378 | 4383 | /* XXX: this solution makes only valgrind happy... |