diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 1999-07-31 20:26:22 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 1999-07-31 20:26:22 +0000 |
commit | 2cc4c2dcb9e95edecb3992eb6ac9c235d8d8157f (patch) | |
tree | e21d7c7e490fabb8d1b48ca5cab173568ec80eb6 /toke.c | |
parent | ba2b843033658a74ad38c16999ec6f60a2256fff (diff) | |
download | perl-2cc4c2dcb9e95edecb3992eb6ac9c235d8d8157f.tar.gz |
Hack the "integer overflow" code some more.
p4raw-id: //depot/cfgperl@3840
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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; |