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:
Jan Nieuwenhuizen 2018-06-18 21:04:41 +02:00
parent b73113dc5c
commit 09604d2dfa
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
1 changed files with 4 additions and 0 deletions

View File

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