summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>1999-07-31 20:26:22 +0000
committerJarkko Hietaniemi <jhi@iki.fi>1999-07-31 20:26:22 +0000
commit2cc4c2dcb9e95edecb3992eb6ac9c235d8d8157f (patch)
treee21d7c7e490fabb8d1b48ca5cab173568ec80eb6 /toke.c
parentba2b843033658a74ad38c16999ec6f60a2256fff (diff)
downloadperl-2cc4c2dcb9e95edecb3992eb6ac9c235d8d8157f.tar.gz
Hack the "integer overflow" code some more.
p4raw-id: //depot/cfgperl@3840
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/toke.c b/toke.c
index 23a8cb4f72..d5e8fb7a8e 100644
--- a/toke.c
+++ b/toke.c
@@ -6410,21 +6410,23 @@ Perl_scan_num(pTHX_ char *start)
sv = NEWSV(92,0);
if (overflowed) {
dTHR;
- if (ckWARN(WARN_UNSAFE) && (double) n > 4294967295.0)
+ if (ckWARN(WARN_UNSAFE) && (NV) n > 4294967295.0)
Perl_warner(aTHX_ WARN_UNSAFE,
"%s number > %s non-portable",
Base, max);
sv_setnv(sv, n);
}
else {
+#if UV_SIZEOF > 4
dTHR;
- if (ckWARN(WARN_UNSAFE) && u > 4294967295)
+ if (ckWARN(WARN_UNSAFE) && u > 0xffffffff)
Perl_warner(aTHX_ WARN_UNSAFE,
"%s number > %s non-portable",
Base, max);
+#endif
sv_setuv(sv, u);
}
- if ( PL_hints & HINT_NEW_BINARY)
+ if (PL_hints & HINT_NEW_BINARY)
sv = new_constant(start, s - start, "binary", sv, Nullsv, NULL);
}
break;