List Info

Thread: Re: overload "0+" doesn't handle integer results




Re: overload "0+" doesn't handle integer results
user name
2007-10-08 09:28:32
On Mon, 8 Oct 2007 10:18:05 -0400, Rick Delaney <rickbort.ca> wrote:

> On Oct 08 2007, H.Merijn Brand wrote:
> > 
> > I did two manual runs with -Duse64bitall on 32068
> > 
> > Linux 2.6.18.8-0.5 x86_64    Xeon(R) CPU E5320

1.86GHz/1596(4) x86_64  3951 Mb
> > 
> > All tests successful, 70 tests and 758 subtests
skipped.
> > Files=1461, Tests=185010, 512 wallclock secs
(258.50 cusr + 35.60 csys = 294.10 CPU)
> > 
> > HP-UX 11.23/64 U   rx1620/64 Itanium 2/1600(2)    
              ia64    2037 Mb
> ...
> > not ok 531 - numifies to self
> > #   Failed test 'numifies to self'
> > #   at ../lib/overload.t line 1397.
> > #          got: '6917529027645582112'
> > #     expected: '6.91752902764558e+18'
> 
> The expected value is just
> 
>     my $aref = [];
>     my $num_val = 0 + $aref;
> 
> So it means that a regular reference in numeric context
is returning an
> NV or that pp_add is not doing integer math when it
should here.  I
> would say that either one is a separate bug.
> 
> I'm pretty sure changing the line to
> 
>     my $num_val = int($aref);
> 
> will make the tests pass without changing the semantic
of the test too
> much.  But we could probably use some TODO tests to
ensure that
> references in numeric context are always returning IVs.
 Or is there a
> platform with pointers bigger than IVs?

I don't think Configure allows that currently on the current
supported systems


-- 
H.Merijn Brand         Amsterdam Perl Mongers (http://amsterdam.pm.org/
)
using & porting perl 5.6.2, 5.8.x, 5.9.x   on HP-UX
10.20, 11.00, 11.11,
& 11.23, SuSE 10.0 & 10.2, AIX 4.3 & 5.2, and
Cygwin. http://qa.perl.org
http://mirrors.de
velooper.com/hpux/            http://www.test-smoke.org
                        http
://www.goldmark.org/jeff/stupid-disclaimers/

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )