From 55131b091ffd4da6342f51849920082e52446e8c Mon Sep 17 00:00:00 2001 From: ceriel Date: Tue, 22 Dec 1992 15:29:56 +0000 Subject: [PATCH] fixed bug: qualified type introduction within structure decl --- lang/cem/cemcom.ansi/input.c | 1 + lang/cem/cemcom.ansi/type.c | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/lang/cem/cemcom.ansi/input.c b/lang/cem/cemcom.ansi/input.c index 0355c0b30..b6e9a4448 100644 --- a/lang/cem/cemcom.ansi/input.c +++ b/lang/cem/cemcom.ansi/input.c @@ -14,6 +14,7 @@ struct file_info finfo; #include "nopp.h" #include +#include #include "dbsymtab.h" #ifndef NOPP diff --git a/lang/cem/cemcom.ansi/type.c b/lang/cem/cemcom.ansi/type.c index 12f980d2b..9cdba8077 100644 --- a/lang/cem/cemcom.ansi/type.c +++ b/lang/cem/cemcom.ansi/type.c @@ -290,7 +290,18 @@ completed(tp) struct type *tp; { register struct type *atp = tp->tp_array; + register struct type *etp = tp; + switch(etp->tp_fund) { + case STRUCT: + case UNION: + case ENUM: + while (etp = etp->next) { + if (! etp->tp_sdef) etp->tp_sdef = tp->tp_sdef; + etp->tp_size = tp->tp_size; + } + break; + } while (atp) { if (atp->tp_nel >= 0) { atp->tp_size = atp->tp_nel * tp->tp_size;