History

libtcc.c: report vstack "leaks" only if compile succeeded

Joe Soroka committed 15 years ago

Commit 48d81a71 parent 2b7a8eb1 file · +3 −2Browse files

Unified · Split

libtcc.c+3−2
@@ -778,7 +778,10 @@ static int tcc_compile(TCCState *s1) · 777 unmodified lines
778778 put_stabs_r(NULL, N_SO, 0, 0,
779779 text_section->data_offset, text_section, section_sym);
780780 }
781+ } else if (pvtop != vtop) {
782+ warning("internal compiler error: vstack leak? (%d)", vtop - pvtop);
781783 }
784+
782785 s1->error_set_jmp_enabled = 0;
783786
784787 /* reset define stack, but leave -Dsymbols (may be incorrect if
@@ -789,8 +792,6 @@ static int tcc_compile(TCCState *s1) · 4 unmodified lines
789792
790793 sym_pop(&global_stack, NULL);
791794 sym_pop(&local_stack, NULL);
792− if (pvtop != vtop)
793− warning("internal compiler error: vstack leak? (%d)", vtop - pvtop);
794795
795796 return s1->nb_errors != 0 ? -1 : 0;
796797 }

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