Re: Re: [PATCH] zend_operators DVAL_TO_LVAL fix
| From: | Joe Orton | Date: | Sun, 12 Sep 2004 16:50:09 +0000 |
| Subject: | Re: Re: [PATCH] zend_operators DVAL_TO_LVAL fix | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-12748@lists.php.net to get a copy of this message | ||
On Sat, Sep 11, 2004 at 03:22:27PM +0200, Ard Biesheuvel wrote:
> Joe Orton wrote:
> >GCC on IA64 does wierd things with this macro, though I think there's a
> >GCC bug involved there too. This fixes the macro to have well-defined
> >behaviour for all values of 'd', and avoids triggering the GCC bug on
> >IA64 to boot (both PHP users on that platform will be happy):
>
> This probably has to do with the fact that on 64-bit systems, doubles
> lack the accuracy to distinguish LONG_MAX from LONG_MAX +1. To be on the
> safe side here, you might want to use >= LONG_MAX instead of > LONG_MAX,
> or cast the other way around.
It actually was a GCC bug, in fact, one of our GCC developers tracked it
down: http://gcc.gnu.org/ml/gcc-patches/2004-08/msg02654.html
joe