bootstrappable: Work around Nyacc-0.80.42 bug.
* tccgen.c (update_storage)[__MESC__]: Work around Nyacc-0.80.42 bug.
This commit is contained in:
parent
b73113dc5c
commit
09604d2dfa
4
tccgen.c
4
tccgen.c
|
@ -300,9 +300,11 @@ ST_FUNC void update_storage(Sym *sym)
|
|||
if (!esym)
|
||||
return;
|
||||
|
||||
#if !__MESC__ // Nyacc 0.80.40 cpp-bug
|
||||
if (sym->a.visibility)
|
||||
esym->st_other = (esym->st_other & ~ELFW(ST_VISIBILITY)(-1))
|
||||
| sym->a.visibility;
|
||||
#endif // Nyacc 0.80.40 cpp-bug
|
||||
|
||||
if (sym->type.t & VT_STATIC)
|
||||
sym_bind = STB_LOCAL;
|
||||
|
@ -311,9 +313,11 @@ ST_FUNC void update_storage(Sym *sym)
|
|||
else
|
||||
sym_bind = STB_GLOBAL;
|
||||
old_sym_bind = ELFW(ST_BIND)(esym->st_info);
|
||||
#if !__MESC__ // Nyacc 0.80.40 cpp-bug
|
||||
if (sym_bind != old_sym_bind) {
|
||||
esym->st_info = ELFW(ST_INFO)(sym_bind, ELFW(ST_TYPE)(esym->st_info));
|
||||
}
|
||||
#endif // Nyacc 0.80.40 cpp-bug
|
||||
|
||||
#ifdef TCC_TARGET_PE
|
||||
if (sym->a.dllimport)
|
||||
|
|
Loading…
Reference in New Issue