aboutsummaryrefslogtreecommitdiff
path: root/libtcc.c
diff options
context:
space:
mode:
authorJoe Soroka <gits@joesoroka.com>2011-04-14 01:02:42 -0700
committerJoe Soroka <gits@joesoroka.com>2011-04-14 01:02:42 -0700
commit48d81a796e5b4e878862899185eaf2106fb76861 (patch)
tree4759c16c018e2ea248968c9724953781b4939912 /libtcc.c
parent2b7a8eb8f56c118d8bfe75d42abd3d88b8e03495 (diff)
downloadtinycc-48d81a796e5b4e878862899185eaf2106fb76861.tar.gz
tinycc-48d81a796e5b4e878862899185eaf2106fb76861.tar.bz2
libtcc.c: report vstack "leaks" only if compile succeeded
Diffstat (limited to 'libtcc.c')
-rw-r--r--libtcc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libtcc.c b/libtcc.c
index 2f77721..d15a09b 100644
--- a/libtcc.c
+++ b/libtcc.c
@@ -778,7 +778,10 @@ static int tcc_compile(TCCState *s1)
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;
/* reset define stack, but leave -Dsymbols (may be incorrect if
@@ -789,8 +792,6 @@ static int tcc_compile(TCCState *s1)
sym_pop(&global_stack, NULL);
sym_pop(&local_stack, NULL);
- if (pvtop != vtop)
- warning("internal compiler error: vstack leak? (%d)", vtop - pvtop);
return s1->nb_errors != 0 ? -1 : 0;
}