From: eck Date: Tue, 28 Nov 1989 15:28:52 +0000 (+0000) Subject: array type-checking was wrong X-Git-Tag: release-5-5~2033 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=5f3e4693e6ed7565b2c1e7e98d50a1deab36cec5;p=ack.git array type-checking was wrong --- diff --git a/lang/cem/cemcom.ansi/ch3.c b/lang/cem/cemcom.ansi/ch3.c index 1b1e6da50..6960f9bf3 100644 --- a/lang/cem/cemcom.ansi/ch3.c +++ b/lang/cem/cemcom.ansi/ch3.c @@ -391,10 +391,15 @@ equal_type(tp, otp, qual_lev) if (!tp || !otp || (tp->tp_fund != otp->tp_fund) - || (tp->tp_size != otp->tp_size) || (tp->tp_unsigned != otp->tp_unsigned) || (tp->tp_align != otp->tp_align)) return 0; + if (tp->tp_size != otp->tp_size) { + if (tp->tp_fund != ARRAY + || (tp->tp_size != -1 && otp->tp_size != -1)) + return 0; + } + if (qual_lev >= 0) { if (tp->tp_typequal != otp->tp_typequal) strict("illegal qualifiers");