aboutsummaryrefslogtreecommitdiff
path: root/tccgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'tccgen.c')
-rw-r--r--tccgen.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tccgen.c b/tccgen.c
index f733598..19909f9 100644
--- a/tccgen.c
+++ b/tccgen.c
@@ -6861,6 +6861,9 @@ static void decl_initializer_alloc(CType *type, AttributeDef *ad, int r,
sym = sym_push(v, type, r | VT_SYM, 0);
patch_storage(sym, ad, NULL);
}
+ /* Local statics have a scope until now (for
+ warnings), remove it here. */
+ sym->sym_scope = 0;
/* update symbol definition */
put_extern_sym(sym, sec, addr, size);
} else {
@@ -7257,6 +7260,9 @@ found:
tcc_error("unsupported forward __alias__ attribute");
esym = &((ElfW(Sym) *)symtab_section->data)[alias_target->c];
tsec.sh_num = esym->st_shndx;
+ /* Local statics have a scope until now (for
+ warnings), remove it here. */
+ sym->sym_scope = 0;
put_extern_sym2(sym, &tsec, esym->st_value, esym->st_size, 0);
}
} else {