Browse Source

Make the long-float overflow check work on 64-bit platforms.

master
Bruno Haible 20 years ago
parent
commit
c4e47eb4f1
  1. 6
      ChangeLog
  2. 6
      src/float/lfloat/cl_LF.h

6
ChangeLog

@ -1,3 +1,9 @@
2005-08-27 Bruno Haible <bruno@clisp.org>
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 <bruno@clisp.org> 2005-08-27 Bruno Haible <bruno@clisp.org>
* modules.h (CL_OUTPUT_LABEL): Work around redundant duplication * modules.h (CL_OUTPUT_LABEL): Work around redundant duplication

6
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. // so that a LF has not fewer mantissa bits than a DF.
#define LF_minlen ceiling(53,intDsize) #define LF_minlen ceiling(53,intDsize)
// Exponent. // 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_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) inline cl_heap_lfloat* TheLfloat (cl_heap_lfloat* p)
{ return p; } { return p; }

Loading…
Cancel
Save