From 0c8447db7970813292a8be74ee50e49091be5d15 Mon Sep 17 00:00:00 2001 From: seyko Date: Tue, 21 Apr 2015 06:34:35 +0300 Subject: * and #pragma pop_macro("macro_name") * give warning if pragma is unknown for tcc * don't free asm_label in sym_free(), it's a job of the asm_free_labels(). The above pragmas are used in the mingw headers. Thise pragmas are implemented in gcc-4.5+ and current clang. --- tccasm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tccasm.c') diff --git a/tccasm.c b/tccasm.c index 3fa6f07..f67c1a6 100644 --- a/tccasm.c +++ b/tccasm.c @@ -292,7 +292,7 @@ static void asm_free_labels(TCCState *st) { Sym *s, *s1; Section *sec; - + for(s = st->asm_labels; s != NULL; s = s1) { s1 = s->prev; /* define symbol value in object file */ @@ -305,6 +305,9 @@ static void asm_free_labels(TCCState *st) } /* remove label */ table_ident[s->v - TOK_IDENT]->sym_label = NULL; + if (s->asm_label) { + tcc_free(s->asm_label); + } sym_free(s); } st->asm_labels = NULL; -- cgit v1.3.1