History

fix spurious vstack-leak warnings on error

Joe Soroka committed 15 years ago

Commit 7391cf01 parent 48d81a71 file · +3 −3Browse files

Unified · Split

libtcc.c+3−3
@@ -759,7 +759,6 @@ static int tcc_compile(TCCState *s1) · 758 unmodified lines
759759
760760 define_start = define_stack;
761761 nocode_wanted = 1;
762− pvtop = vtop;
763762
764763 if (setjmp(s1->error_jmp_buf) == 0) {
765764 s1->nb_errors = 0;
@@ -768,18 +767,19 @@ static int tcc_compile(TCCState *s1) · 2 unmodified lines
768767 ch = file->buf_ptr[0];
769768 tok_flags = TOK_FLAG_BOL | TOK_FLAG_BOF;
770769 parse_flags = PARSE_FLAG_PREPROCESS | PARSE_FLAG_TOK_NUM;
770+ pvtop = vtop;
771771 next();
772772 decl(VT_CONST);
773773 if (tok != TOK_EOF)
774774 expect("declaration");
775+ if (pvtop != vtop)
776+ warning("internal compiler error: vstack leak? (%d)", vtop - pvtop);
775777
776778 /* end of translation unit info */
777779 if (s1->do_debug) {
778780 put_stabs_r(NULL, N_SO, 0, 0,
779781 text_section->data_offset, text_section, section_sym);
780782 }
781− } else if (pvtop != vtop) {
782− warning("internal compiler error: vstack leak? (%d)", vtop - pvtop);
783783 }
784784
785785 s1->error_set_jmp_enabled = 0;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t