+2008-03-31 Bruno Haible <bruno@clisp.org>
+
+ Fix hack from 2008-01-20 that broke on ARM.
+ * src/float/ffloat/conv/cl_FF_from_float.cc (FAST_FLOAT): Remove.
+ (cl_float_to_FF_pointer): Use anonymous union for conversion.
+ * src/float/dfloat/conv/cl_DF_from_double.cc (FAST_DOUBLE): Remove.
+ (cl_double_to_DF_pointer): Use anonymous union for conversion.
+
2008-03-24 Richard B. Kreckel <kreckel@ginac.de>
* Version 1.2.1 released.
// cl_double_to_DF_pointer().
-// Ensure that union dfloatjanus has a 'double' alternative.
-#define FAST_DOUBLE
-
// General includes.
#include "cl_sysdep.h"
cl_heap_dfloat* cl_double_to_DF_pointer (const double x)
{
- var union dfloatjanus val_;
- val_.machine_double = x;
- var dfloat val = val_.eksplicit;
+ var union { dfloat eksplicit; double machine_double; } u;
+ u.machine_double = x;
+ var dfloat val = u.eksplicit;
#if (cl_word_size==64)
var uintL exp = (val >> DF_mant_len) & (bit(DF_exp_len)-1); // e
if (exp == 0) // e=0 ?
// cl_float_to_FF_pointer().
-// Ensure that union ffloatjanus has a 'float' alternative.
-#define FAST_FLOAT
-
// General includes.
#include "cl_sysdep.h"
cl_private_thing cl_float_to_FF_pointer (const float x)
{
- var union ffloatjanus val_;
- val_.machine_float = x;
- var ffloat val = val_.eksplicit;
+ var union { ffloat eksplicit; float machine_float; } u;
+ u.machine_float = x;
+ var ffloat val = u.eksplicit;
var uintL exp = (val >> FF_mant_len) & (bit(FF_exp_len)-1); // e
if (exp == 0) // e=0 ?
// vorzeichenbehaftete 0.0 oder subnormale Zahl