This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix some 32/64-bit compiler warnings
Some bits of code don't do well on a 32-bit system with 64-bit ints
(-Duse64bitint)
In particular:
_MEM_WRAP_NEEDS_RUNTIME_CHECK:
if sizeof(MEM_SIZE) > sizeof(n), then the shift count could be
negative
S_regmatch:
ln and n were two different sizes and signesses, so comparing them
warned. Since they were being mis-used as two convenient temporary
booleans anyway, just use temporary booleans instead.
Perl_sv_vcatpvfn_flags:
the test/assertion (IV)elen < 0 was (I think) being used to test for
signed/unsigned conversion wrap-around. elen is of type STRLEN which
is a pointer-based type, so can be 32-bit while IV is 64-bit. Instead
compare it to half the maximum value of a STRLEN var to see if it may
have wrapped.