fixed problem with 'if (array)'

This commit is contained in:
ceriel 1988-08-04 14:37:06 +00:00
parent 1726d23a44
commit 28d39e927b

View file

@ -357,13 +357,20 @@ opnd2logical(expp, oper)
register struct expr **expp; register struct expr **expp;
int oper; int oper;
{ {
int fund; int fund = (*expp)->ex_type->tp_fund;
if ((*expp)->ex_type->tp_fund == FUNCTION) if (fund == FUNCTION || fund == ARRAY) {
expr_warning(*expp, "%s operand to %s",
symbol2str(fund),
symbol2str(oper));
if (fund == FUNCTION) {
function2pointer(*expp); function2pointer(*expp);
}
else array2pointer(*expp);
}
#ifndef NOBITFIELD #ifndef NOBITFIELD
else else
if ((*expp)->ex_type->tp_fund == FIELD) if (fund == FIELD)
field2arith(expp); field2arith(expp);
#endif NOBITFIELD #endif NOBITFIELD
switch (fund = (*expp)->ex_type->tp_fund) { switch (fund = (*expp)->ex_type->tp_fund) {