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.
This commit is contained in:
4
libtcc.c
4
libtcc.c
@ -670,13 +670,13 @@ static int tcc_compile(TCCState *s1)
|
|||||||
decl(VT_CONST);
|
decl(VT_CONST);
|
||||||
if (tok != TOK_EOF)
|
if (tok != TOK_EOF)
|
||||||
expect("declaration");
|
expect("declaration");
|
||||||
|
/* reset define stack, but keep -D and built-ins */
|
||||||
|
free_defines(define_start);
|
||||||
tccgen_end(s1);
|
tccgen_end(s1);
|
||||||
}
|
}
|
||||||
s1->error_set_jmp_enabled = 0;
|
s1->error_set_jmp_enabled = 0;
|
||||||
|
|
||||||
free_inline_functions(s1);
|
free_inline_functions(s1);
|
||||||
/* reset define stack, but keep -D and built-ins */
|
|
||||||
free_defines(define_start);
|
|
||||||
sym_pop(&global_stack, NULL);
|
sym_pop(&global_stack, NULL);
|
||||||
sym_pop(&local_stack, NULL);
|
sym_pop(&local_stack, NULL);
|
||||||
return s1->nb_errors != 0 ? -1 : 0;
|
return s1->nb_errors != 0 ? -1 : 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user