Remove the duplicate warnings and update tests.
p4raw-id: //depot/perl@22796
else preferring IV has introduced a subtle behaviour change bug. OTOH
relying on floating point to be accurate is a bug. */
- if (SvIOK(TOPs)) {
+ if (!SvOK(TOPs))
+ SETu(0);
+ else if (SvIOK(TOPs)) {
if (SvIsUV(TOPs)) {
UV uv = TOPu;
SETu(uv);
/* This will cache the NV value if string isn't actually integer */
IV iv = TOPi;
- if (SvIOK(TOPs)) {
+ if (!SvOK(TOPs))
+ SETu(0);
+ else if (SvIOK(TOPs)) {
/* IVX is precise */
if (SvIsUV(TOPs)) {
SETu(TOPu); /* force it to be numeric only */
$v = abs($g2);
EXPECT
Use of uninitialized value $g1 in int at - line 5.
-Use of uninitialized value $g1 in int at - line 5.
-Use of uninitialized value $g2 in abs at - line 6.
Use of uninitialized value $g2 in abs at - line 6.
########
use warnings 'uninitialized';