public
/
ack.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f0275b
)
sometimes swap operands in expressions with side-effects
author
eck
<none@none>
Thu, 6 Sep 1990 14:49:52 +0000
(14:49 +0000)
committer
eck
<none@none>
Thu, 6 Sep 1990 14:49:52 +0000
(14:49 +0000)
lang/cem/cemcom.ansi/ch3bin.c
patch
|
blob
|
history
diff --git
a/lang/cem/cemcom.ansi/ch3bin.c
b/lang/cem/cemcom.ansi/ch3bin.c
index
72bd477
..
0c4fe07
100644
(file)
--- a/
lang/cem/cemcom.ansi/ch3bin.c
+++ b/
lang/cem/cemcom.ansi/ch3bin.c
@@
-340,7
+340,9
@@
mk_binop(expp, oper, expr, commutative)
else {
*expp = (commutative
&& !(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)))
? new_oper(ex->ex_type, expr, arg_switched(oper), ex)
: new_oper(ex->ex_type, ex, oper, expr);