public
/
ack.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ced856c
)
fix to constant unary minus
author
ceriel
<none@none>
Wed, 31 May 1989 12:42:56 +0000
(12:42 +0000)
committer
ceriel
<none@none>
Wed, 31 May 1989 12:42:56 +0000
(12:42 +0000)
lang/cem/cemcom/ch7mon.c
patch
|
blob
|
history
diff --git
a/lang/cem/cemcom/ch7mon.c
b/lang/cem/cemcom/ch7mon.c
index
c4cd2e6
..
96d758d
100644
(file)
--- a/
lang/cem/cemcom/ch7mon.c
+++ b/
lang/cem/cemcom/ch7mon.c
@@
-111,10
+111,11
@@
ch7mon(oper, expp)
if (is_cp_cst(*expp)) {
arith o1 = (*expp)->VL_VALUE;
- (*expp)->VL_VALUE = (oper == '-') ? -o1 :
+ o1 = (oper == '-') ? -o1 : ~o1;
+ (*expp)->VL_VALUE =
((*expp)->ex_type->tp_unsigned ?
-
(~o1)
& full_mask[(*expp)->ex_type->tp_size] :
-
~
o1
+
o1
& full_mask[(*expp)->ex_type->tp_size] :
+ o1
);
}
else