diff options
author | Nicholas Clark <nick@ccl4.org> | 2008-01-24 21:11:11 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2008-01-24 21:11:11 +0000 |
commit | a12a6a4d3f64aee86ecc1228a0f84bd167873367 (patch) | |
tree | 885ebfb3490e158bad8d8b0b8c3ff8e0e68ff622 /t/op/64bitint.t | |
parent | de5429e8ea1cd410619e338a6fa831e76278f2c5 (diff) | |
download | perl-a12a6a4d3f64aee86ecc1228a0f84bd167873367.tar.gz |
Don't warn about imprecision when decrementing IV_MIN.
Based on a patch by Jerry D. Hedden, but only instead only disable
warnings for the specific operations that we know will warn.
p4raw-id: //depot/perl@33065
Diffstat (limited to 't/op/64bitint.t')
-rw-r--r-- | t/op/64bitint.t | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/t/op/64bitint.t b/t/op/64bitint.t index e8314fac8a..399030a341 100644 --- a/t/op/64bitint.t +++ b/t/op/64bitint.t @@ -172,13 +172,19 @@ if ($^O ne 'unicos') { print "ok 28\n"; $a = -9223372036854775808; - $c = $a--; + { + no warnings 'imprecision'; + $c = $a--; + } print "not " unless $a == -9223372036854775809 && $c == -9223372036854775808; print "ok 29\n"; $a = -9223372036854775808; - $c = --$a; + { + no warnings 'imprecision'; + $c = --$a; + } print "not " unless $a == -9223372036854775809 && $c == $a; print "ok 30\n"; @@ -191,14 +197,20 @@ if ($^O ne 'unicos') { $a = 9223372036854775808; $a = -$a; - $c = $a--; + { + no warnings 'imprecision'; + $c = $a--; + } print "not " unless $a == -9223372036854775809 && $c == -9223372036854775808; print "ok 32\n"; $a = 9223372036854775808; $a = -$a; - $c = --$a; + { + no warnings 'imprecision'; + $c = --$a; + } print "not " unless $a == -9223372036854775809 && $c == $a; print "ok 33\n"; @@ -212,14 +224,20 @@ if ($^O ne 'unicos') { $a = 9223372036854775808; $b = -$a; - $c = $b--; + { + no warnings 'imprecision'; + $c = $b--; + } print "not " unless $b == -$a-1 && $c == -$a; print "ok 35\n"; $a = 9223372036854775808; $b = -$a; - $c = --$b; + { + no warnings 'imprecision'; + $c = --$b; + } print "not " unless $b == -$a-1 && $c == $b; print "ok 36\n"; |