From: ceriel Date: Thu, 4 Aug 1988 14:37:06 +0000 (+0000) Subject: fixed problem with 'if (array)' X-Git-Tag: release-5-5~2953 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=28d39e927b8dfe452c60ee734366aa704d5bf0ff;p=ack.git fixed problem with 'if (array)' --- diff --git a/lang/cem/cemcom/arith.c b/lang/cem/cemcom/arith.c index e07a2dc37..ea9dc3207 100644 --- a/lang/cem/cemcom/arith.c +++ b/lang/cem/cemcom/arith.c @@ -357,13 +357,20 @@ opnd2logical(expp, oper) register struct expr **expp; int oper; { - int fund; - - if ((*expp)->ex_type->tp_fund == FUNCTION) - function2pointer(*expp); + int fund = (*expp)->ex_type->tp_fund; + + if (fund == FUNCTION || fund == ARRAY) { + expr_warning(*expp, "%s operand to %s", + symbol2str(fund), + symbol2str(oper)); + if (fund == FUNCTION) { + function2pointer(*expp); + } + else array2pointer(*expp); + } #ifndef NOBITFIELD else - if ((*expp)->ex_type->tp_fund == FIELD) + if (fund == FIELD) field2arith(expp); #endif NOBITFIELD switch (fund = (*expp)->ex_type->tp_fund) {