use warnings 'overflow' ;
my $a = 0b011111111111111111111111111111110 ;
$a = 0b011111111111111111111111111111111 ;
- $a = 0b111111111111111111111111111111111 ;
+ $a = 0b10000000000000000000000000000000000000000000000000000000000000000 ;
$a = 0x0fffffffe ;
$a = 0x0ffffffff ;
- $a = 0x1ffffffff ;
+ $a = 0x10000000000000000 ;
$a = 0037777777776 ;
$a = 0037777777777 ;
- $a = 0047777777777 ;
+ $a = 002000000000000000000000;
no warnings 'overflow' ;
$a = 0b011111111111111111111111111111110 ;
$a = 0b011111111111111111111111111111111 ;
- $a = 0b111111111111111111111111111111111 ;
+ $a = 0b10000000000000000000000000000000000000000000000000000000000000000 ;
$a = 0x0fffffffe ;
$a = 0x0ffffffff ;
- $a = 0x1ffffffff ;
+ $a = 0x10000000000000000 ;
$a = 0037777777776 ;
$a = 0037777777777 ;
- $a = 0047777777777 ;
+ $a = 002000000000000000000000;
EXPECT
Integer overflow in binary number at - line 5.
Integer overflow in hexadecimal number at - line 8.
########
# util.c
use warnings 'overflow' ;
-my $a = oct "0b111111111111111111111111111111111111111111" ;
+my $a = oct "0b11111111111111111111111111111111111111111111111111111111111111111";
no warnings 'overflow' ;
-$a = oct "0b111111111111111111111111111111111111111111" ;
+$a = oct "0b11111111111111111111111111111111111111111111111111111111111111111";
EXPECT
Integer overflow in binary number at - line 3.
########
sv_setnv(sv, n);
}
else {
-#if UV_SIZEOF > 4
+#if UVSIZE > 4
dTHR;
if (ckWARN(WARN_PORTABLE) && u > 0xffffffff)
Perl_warner(aTHX_ WARN_PORTABLE,
if (!overflowed)
rnv = (NV) ruv;
if ( ( overflowed && rnv > 4294967295.0)
-#if UV_SIZEOF > 4
+#if UVSIZE > 4
|| (!overflowed && ruv > 0xffffffff )
#endif
) {
if (!overflowed)
rnv = (NV) ruv;
if ( ( overflowed && rnv > 4294967295.0)
-#if UV_SIZEOF > 4
+#if UVSIZE > 4
|| (!overflowed && ruv > 0xffffffff )
#endif
) {
if (!overflowed)
rnv = (NV) ruv;
if ( ( overflowed && rnv > 4294967295.0)
-#if UV_SIZEOF > 4
+#if UVSIZE > 4
|| (!overflowed && ruv > 0xffffffff )
#endif
) {