Re: [PHP-DEV] Re: [PATCH] zend_operators DVAL_TO_LVAL fix

2004-09-14 Thread Andi Gutmans
Also <= LONG_MIN needed? I guess yes? At 03:22 PM 9/11/2004 +0200, Ard Biesheuvel wrote: Joe Orton wrote: The DVAL_TO_LVAL macro is quite weird, I'm not sure exactly what it's supposed to be doing but it probably isn't doing it. If the integral part of d is outside the range of a long, the conversi

Re: [PHP-DEV] Re: [PATCH] zend_operators DVAL_TO_LVAL fix

2004-09-12 Thread Joe Orton
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 b

[PHP-DEV] Re: [PATCH] zend_operators DVAL_TO_LVAL fix

2004-09-11 Thread Ard Biesheuvel
Joe Orton wrote: The DVAL_TO_LVAL macro is quite weird, I'm not sure exactly what it's supposed to be doing but it probably isn't doing it. If the integral part of d is outside the range of a long, the conversion has undefined behaviour by the C99 standard; an explicit cast makes no difference AFAI

[PHP-DEV] Re: [PATCH] zend_operators DVAL_TO_LVAL fix

2004-09-11 Thread Ard Biesheuvel
Joe Orton wrote: The DVAL_TO_LVAL macro is quite weird, I'm not sure exactly what it's supposed to be doing but it probably isn't doing it. If the integral part of d is outside the range of a long, the conversion has undefined behaviour by the C99 standard; an explicit cast makes no difference AFAI