aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Soroka <gits@joesoroka.com>2011-05-02 00:05:36 -0700
committerJoe Soroka <gits@joesoroka.com>2011-05-02 00:05:36 -0700
commit7391cf01a726b41e18c6f64d3befeefd34d24496 (patch)
tree8625868a87b2a1039f7c891b32e3f805795dd273
parent48d81a796e5b4e878862899185eaf2106fb76861 (diff)
downloadtinycc-7391cf01a726b41e18c6f64d3befeefd34d24496.tar.gz
tinycc-7391cf01a726b41e18c6f64d3befeefd34d24496.tar.bz2
fix spurious vstack-leak warnings on error
-rw-r--r--libtcc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libtcc.c b/libtcc.c
index d15a09b..5dc7be9 100644
--- a/libtcc.c
+++ b/libtcc.c
@@ -759,7 +759,6 @@ static int tcc_compile(TCCState *s1)
define_start = define_stack;
nocode_wanted = 1;
- pvtop = vtop;
if (setjmp(s1->error_jmp_buf) == 0) {
s1->nb_errors = 0;
@@ -768,18 +767,19 @@ static int tcc_compile(TCCState *s1)
ch = file->buf_ptr[0];
tok_flags = TOK_FLAG_BOL | TOK_FLAG_BOF;
parse_flags = PARSE_FLAG_PREPROCESS | PARSE_FLAG_TOK_NUM;
+ pvtop = vtop;
next();
decl(VT_CONST);
if (tok != TOK_EOF)
expect("declaration");
+ if (pvtop != vtop)
+ warning("internal compiler error: vstack leak? (%d)", vtop - pvtop);
/* end of translation unit info */
if (s1->do_debug) {
put_stabs_r(NULL, N_SO, 0, 0,
text_section->data_offset, text_section, section_sym);
}
- } else if (pvtop != vtop) {
- warning("internal compiler error: vstack leak? (%d)", vtop - pvtop);
}
s1->error_set_jmp_enabled = 0;