summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorM. J. T. Guy <mjtg@cus.cam.ac.uk>2000-04-18 19:24:49 +0100
committerJarkko Hietaniemi <jhi@iki.fi>2000-04-24 17:26:05 +0000
commit85e0ebd8793b17cfbac766abc03b5fff57b2b2cd (patch)
treee48ed318ccf7c1ed15fcb0a05dba0d524263f0da
parent6439433f25b10ec5d9ab02cf0758bdbcfdffe5ff (diff)
downloadperl-85e0ebd8793b17cfbac766abc03b5fff57b2b2cd.tar.gz
Do not assume sign propagation.
Subject: [PATCH] Re: [ID 20000410.010] Unicoss 10.0.0.6 and perl 5.6.0 To: payner@ncifcrf.gov, perl5-porters@perl.org Message-Id: <E12hbk1-0006Ws-00@ursa.cus.cam.ac.uk> p4raw-id: //depot/cfgperl@5935
-rwxr-xr-xt/op/bop.t2
-rwxr-xr-xt/op/misc.t6
2 files changed, 4 insertions, 4 deletions
diff --git a/t/op/bop.t b/t/op/bop.t
index 7bcabdfd58..22a5bc9e3f 100755
--- a/t/op/bop.t
+++ b/t/op/bop.t
@@ -39,7 +39,7 @@ print (((1 << ($bits - 1)) == $cusp &&
do { use integer; 1 << ($bits - 1) } == -$cusp)
? "ok 11\n" : "not ok 11\n");
print ((($cusp >> 1) == ($cusp / 2) &&
- do { use integer; $cusp >> 1 } == -($cusp / 2))
+ do { use integer; abs($cusp >> 1) } == ($cusp / 2))
? "ok 12\n" : "not ok 12\n");
$Aaz = chr(ord("A") & ord("z"));
diff --git a/t/op/misc.t b/t/op/misc.t
index ac1a44fadb..41a720215f 100755
--- a/t/op/misc.t
+++ b/t/op/misc.t
@@ -59,12 +59,12 @@ $a = ":="; split /($a)/o, "a:=b:=c"; print "@_"
EXPECT
a := b := c
########
-use integer;
$cusp = ~0 ^ (~0 >> 1);
+use integer;
$, = " ";
-print +($cusp - 1) % 8, $cusp % 8, -$cusp % 8, ($cusp + 1) % 8, "!\n";
+print +($cusp - 1) % 8, $cusp % 8, -$cusp % 8, 8 | (($cusp + 1) % 8 + 7), "!\n";
EXPECT
--1 0 0 1 !
+7 0 0 8 !
########
$foo=undef; $foo->go;
EXPECT