sometimes swap operands in expressions with side-effects

This commit is contained in:
eck 1990-09-06 14:49:52 +00:00
parent 118473af52
commit 606e882015

View File

@ -341,6 +341,8 @@ mk_binop(expp, oper, expr, commutative)
*expp = (commutative *expp = (commutative
&& !(ex->ex_flags & EX_VOLATILE) && !(ex->ex_flags & EX_VOLATILE)
&& (expr->ex_depth > ex->ex_depth && (expr->ex_depth > ex->ex_depth
|| ((expr->ex_flags & EX_SIDEEFFECTS)
&& !(ex->ex_flags & EX_SIDEEFFECTS))
|| is_cp_cst(ex))) || is_cp_cst(ex)))
? new_oper(ex->ex_type, expr, arg_switched(oper), ex) ? new_oper(ex->ex_type, expr, arg_switched(oper), ex)
: new_oper(ex->ex_type, ex, oper, expr); : new_oper(ex->ex_type, ex, oper, expr);