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