Le 10/02/2013 20:27, Gustavo Lopes a écrit :

> Any reservations?

Do we really want/need to change the current behavior.

Cast from double, outside of integer range, result in a fix value.

The only problem is that the value is not the same on all arch.

x86_64 always return 0x8000...

ppc64 returns
 LONG_MAX (0x7fff...) for signed value >= LONG_MAX
 LONG_MIN (0x8000...) for signed value <= LONG_MIN
ULONG_MAX (0xffff...) for unsigned value >= ULONG_MAX

NB. The current fix applied only fix LONG_MAX value.
Cast for >= ULONG_MAX is not fixed.

Note (my "very" personal opinion) I think ppc64 behavior is better as it
preserve the sign of the result... ;)

But Intel seems the "standard"...


Remi.


-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to