This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
(perl #125557) correctly handle overload for bin/oct floats
authorTony Cook <tony@develop-help.com>
Wed, 11 Sep 2019 01:50:23 +0000 (11:50 +1000)
committerTony Cook <tony@develop-help.com>
Mon, 16 Sep 2019 00:17:31 +0000 (10:17 +1000)
commit2cb5a7e8af11acb0eca22421ec5a4df7ef18e2a9
treeb8154a76d2c3d7e1ed8abe57e71135c8b7b17a42
parent3ace85ea4f1777b7a1f1151aef632e45926bbbae
(perl #125557) correctly handle overload for bin/oct floats

The hexfp code doesn't check that the shift is 4, and so also
accepts binary and octal fp numbers.

Unfortunately the call to S_new_constant() always passed a prefix
of 0x, so overloading would be trying to parse the wrong number.

Another option is to simply allow only hex floats, though some work
was done in 131894 to improve oct/bin float support.
t/op/hexfp.t
toke.c