# New Ticket Created by  Jarkko Hietaniemi 
# Please include the string:  [perl #30896]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=30896 >


$ cat big.pasm
   new P0, .BigInt
   set P0, 18446744073709551615
   print P0
   print "\n"
   end
$ ./parrot ~/big.pasm
9223372036854775807
$

This on a 64-bit system (tru64 alpha), substitute 4294967295 for the
18446744073709551615 in a 32-bit system.  I don't right now have a
parrot compiled on a 32-bit system with bigints available so I can't
check whether the same thing happens there.

I don't know off-hand what would be The Right Thing here (I'm guessing
that a signed long is used to hold the parsed constant, and that's why
the "unsigned" constant overflows) -- but silent lossage / corruption of
the PASM's intent is clearly not a right thing to do.

-- 
Jarkko Hietaniemi <[EMAIL PROTECTED]> http://www.iki.fi/jhi/ "There is this special
biologist word we use for 'stable'.  It is 'dead'." -- Jack Cohen

Reply via email to