* 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.
This commit is contained in:
seyko
2015-04-21 06:34:35 +03:00
parent 5e8fb713c4
commit 0c8447db79
8 changed files with 71 additions and 3 deletions

View File

@ -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;