]> www.ginac.de Git - cln.git/commitdiff
Fix hack from 2008-01-20 that broke on ARM.
authorBruno Haible <bruno@clisp.org>
Tue, 1 Apr 2008 00:51:50 +0000 (00:51 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 1 Apr 2008 00:51:50 +0000 (00:51 +0000)
ChangeLog
src/float/dfloat/conv/cl_DF_from_double.cc
src/float/ffloat/conv/cl_FF_from_float.cc

index 561eb11176352b70be1fabf641cd7e6c178a8d61..3e170fa1a38478bbfdedd11c9ec4e5f821087b98 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+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.
index ce145e704fc8d5c19d08a2e03bb1b6bc503028e3..e4ada06ca9426dcc0bb5d9004eb07858a159d8a8 100644 (file)
@@ -1,8 +1,5 @@
 // cl_double_to_DF_pointer().
 
-// Ensure that union dfloatjanus has a 'double' alternative.
-#define FAST_DOUBLE
-
 // General includes.
 #include "cl_sysdep.h"
 
@@ -16,9 +13,9 @@ namespace cln {
 
 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 ?
index da7e9a3c2dfc727f7931ea58d4200cf502dd7e37..7181c9727164f2828236dda63ba1fece60abd634 100644 (file)
@@ -1,8 +1,5 @@
 // cl_float_to_FF_pointer().
 
-// Ensure that union ffloatjanus has a 'float' alternative.
-#define FAST_FLOAT
-
 // General includes.
 #include "cl_sysdep.h"
 
@@ -15,9 +12,9 @@ namespace cln {
 
 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