* 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:
5
tccasm.c
5
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;
|
||||
|
||||
Reference in New Issue
Block a user