aboutsummaryrefslogtreecommitdiff
path: root/libtcc.c
diff options
context:
space:
mode:
authorMichael Matz <matz@suse.de>2016-10-17 05:20:20 +0200
committerMichael Matz <matz@suse.de>2016-12-15 17:47:06 +0100
commit21d2b71b5c1ad1c51866ff8d7a1376f132b1cafa (patch)
tree3e0159e338f8e89c35b5e97b6aa55d189fbf0f17 /libtcc.c
parent38e5cf0983e02b2fc77d77adfd9b937768dfcfd5 (diff)
downloadtinycc-21d2b71b5c1ad1c51866ff8d7a1376f132b1cafa.tar.gz
tinycc-21d2b71b5c1ad1c51866ff8d7a1376f132b1cafa.tar.bz2
Free defines before gen_inline_functions
gen_inline_functions uses the macro facilities of the preprocessor, which would interact when macros would still be defined in a different pre-processor implementation I'm working on. So always free defines before generating inline functions, they are all macro expanded already.
Diffstat (limited to 'libtcc.c')
-rw-r--r--libtcc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libtcc.c b/libtcc.c
index e92a035..23e4e76 100644
--- a/libtcc.c
+++ b/libtcc.c
@@ -670,13 +670,13 @@ static int tcc_compile(TCCState *s1)
decl(VT_CONST);
if (tok != TOK_EOF)
expect("declaration");
+ /* reset define stack, but keep -D and built-ins */
+ free_defines(define_start);
tccgen_end(s1);
}
s1->error_set_jmp_enabled = 0;
free_inline_functions(s1);
- /* reset define stack, but keep -D and built-ins */
- free_defines(define_start);
sym_pop(&global_stack, NULL);
sym_pop(&local_stack, NULL);
return s1->nb_errors != 0 ? -1 : 0;