Fixed scope bug for structures: a(struct S *p) { struct S { int i; }; p->i ...

should work
This commit is contained in:
ceriel 1992-10-14 10:48:27 +00:00
parent 537cbd3d89
commit 50db0a3643

View file

@ -188,7 +188,10 @@ declare_struct(fund, idf, tpp)
if (tg if (tg
&& tg->tg_type->tp_size < 0 && tg->tg_type->tp_size < 0
&& tg->tg_type->tp_fund == fund && tg->tg_type->tp_fund == fund
&& tg->tg_level == level) { && (tg->tg_level == level
|| (level >= L_FORMAL2
&& level <= L_LOCAL
&& tg->tg_level == L_FORMAL2))) {
/* An unfinished declaration has preceded it. /* An unfinished declaration has preceded it.
We just fill in the answer. We just fill in the answer.
*/ */