aboutsummaryrefslogtreecommitdiff
path: root/tccasm.c
diff options
context:
space:
mode:
authorseyko <seyko2@gmail.com>2015-04-21 06:34:35 +0300
committerseyko <seyko2@gmail.com>2015-04-21 06:34:35 +0300
commit0c8447db7970813292a8be74ee50e49091be5d15 (patch)
treef1db257725c3ac9ddec1632473835a0e44d2d240 /tccasm.c
parent5e8fb713c49cfad17d5fb78fb353d88b1ab86eb8 (diff)
downloadtinycc-0c8447db7970813292a8be74ee50e49091be5d15.tar.gz
tinycc-0c8447db7970813292a8be74ee50e49091be5d15.tar.bz2
* 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.
Diffstat (limited to 'tccasm.c')
-rw-r--r--tccasm.c5
1 files changed, 4 insertions, 1 deletions
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;