diff --git a/ChangeLog b/ChangeLog index b99032e..238ca86 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-08-27 Bruno Haible + + Make the long-float overflow check work on 64-bit platforms. + * src/float/lfloat/cl_LF.h (LF_exp_mid, LF_exp_high): Define as + 'unsigned int', not 'unsigned long'. + 2005-08-27 Bruno Haible * modules.h (CL_OUTPUT_LABEL): Work around redundant duplication diff --git a/src/float/lfloat/cl_LF.h b/src/float/lfloat/cl_LF.h index 3a3fc96..8da8d40 100644 --- a/src/float/lfloat/cl_LF.h +++ b/src/float/lfloat/cl_LF.h @@ -20,9 +20,11 @@ struct cl_heap_lfloat : cl_heap { // so that a LF has not fewer mantissa bits than a DF. #define LF_minlen ceiling(53,intDsize) // Exponent. +// Define as 'unsigned int', not 'unsigned long', so that +// LF_exp_high+1 wraps around to 0 just like the 'expo' field does. #define LF_exp_low 1 - #define LF_exp_mid 0x80000000UL - #define LF_exp_high 0xFFFFFFFFUL + #define LF_exp_mid 0x80000000U + #define LF_exp_high 0xFFFFFFFFU inline cl_heap_lfloat* TheLfloat (cl_heap_lfloat* p) { return p; }