Unified · Split
| @@ -759,7 +759,6 @@ static int tcc_compile(TCCState *s1) · 758 unmodified lines | ||
| 759 | 759 | |
| 760 | 760 | define_start = define_stack; |
| 761 | 761 | nocode_wanted = 1; |
| 762 | − pvtop = vtop; | |
| 763 | 762 | |
| 764 | 763 | if (setjmp(s1->error_jmp_buf) == 0) { |
| 765 | 764 | s1->nb_errors = 0; |
| @@ -768,18 +767,19 @@ static int tcc_compile(TCCState *s1) · 2 unmodified lines | ||
| 768 | 767 | ch = file->buf_ptr[0]; |
| 769 | 768 | tok_flags = TOK_FLAG_BOL | TOK_FLAG_BOF; |
| 770 | 769 | parse_flags = PARSE_FLAG_PREPROCESS | PARSE_FLAG_TOK_NUM; |
| 770 | + pvtop = vtop; | |
| 771 | 771 | next(); |
| 772 | 772 | decl(VT_CONST); |
| 773 | 773 | if (tok != TOK_EOF) |
| 774 | 774 | expect("declaration"); |
| 775 | + if (pvtop != vtop) | |
| 776 | + warning("internal compiler error: vstack leak? (%d)", vtop - pvtop); | |
| 775 | 777 | |
| 776 | 778 | /* end of translation unit info */ |
| 777 | 779 | if (s1->do_debug) { |
| 778 | 780 | put_stabs_r(NULL, N_SO, 0, 0, |
| 779 | 781 | text_section->data_offset, text_section, section_sym); |
| 780 | 782 | } |
| 781 | − } else if (pvtop != vtop) { | |
| 782 | − warning("internal compiler error: vstack leak? (%d)", vtop - pvtop); | |
| 783 | 783 | } |
| 784 | 784 | |
| 785 | 785 | s1->error_set_jmp_enabled = 0; |