diff --git a/lang/cem/cemcom.ansi/ch3.c b/lang/cem/cemcom.ansi/ch3.c index bfe03f15c..0b1d06297 100644 --- a/lang/cem/cemcom.ansi/ch3.c +++ b/lang/cem/cemcom.ansi/ch3.c @@ -571,11 +571,17 @@ int qual; ASSERT(tp); if (tp->tp_typequal & qual) return 1; - sdf = tp->tp_sdef; - while (sdf) { - if (recurqual(sdf->sd_type, qual)) - return 1; - sdf = sdf->sd_sdef; + switch(tp->tp_fund) { + case UNION: + case STRUCT: + case ENUM: + sdf = tp->tp_sdef; + while (sdf) { + if (recurqual(sdf->sd_type, qual)) + return 1; + sdf = sdf->sd_sdef; + } + break; } return 0; }