From: Nicholas Clark Date: Thu, 24 Jan 2008 21:11:11 +0000 (+0000) Subject: Don't warn about imprecision when decrementing IV_MIN. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a12a6a4d3f64aee86ecc1228a0f84bd167873367;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/t/op/64bitint.t b/t/op/64bitint.t index e8314fa..399030a 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";