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-05-12 08:18:21 +02:00
parent 2e20df36ee
commit 09b7076e84
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
1 changed files with 4 additions and 1 deletions

View File

@ -270,13 +270,16 @@ static void update_storage(Sym *sym)
t = sym->type.t;
esym = &((ElfW(Sym) *)symtab_section->data)[sym->c];
#if !__MESC__ // Nyacc 0.80.40 cpp-bug
if (t & VT_VIS_MASK)
esym->st_other = (esym->st_other & ~ELFW(ST_VISIBILITY)(-1))
| ((t & VT_VIS_MASK) >> VT_VIS_SHIFT);
if (t & VT_WEAK)
esym->st_info = ELFW(ST_INFO)(STB_WEAK, ELFW(ST_TYPE)(esym->st_info));
#else //__MESC__
// #warning work around Nyacc 0.80.42 bug.
#endif // __MESC__
#ifdef TCC_TARGET_PE
if (t & VT_EXPORT)
esym->st_other |= ST_PE_EXPORT;