This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove undefined behavior from IV shifting
authorKarl Williamson <khw@cpan.org>
Fri, 3 May 2019 19:57:47 +0000 (13:57 -0600)
committerKarl Williamson <khw@cpan.org>
Fri, 24 May 2019 23:09:30 +0000 (17:09 -0600)
commit814735a391b874af8f00eaf89469e5ec7f38cd4a
treeb7f652cf8c5eac3042fcc8304ff8df3418f573c7
parentbae047b68c92622bb4bb04499e36cdaa48138909
Remove undefined behavior from IV shifting

It is undefined behavior to shift a negative integer to the left.  This
commit avoids that by treating the value as unsigned, then casting back
to integer for return.
asan_ignore
pp.c