float tests: Correct and re-enable assertion about LDBL_MIN_EXP.
authorPaolo Bonzini <bonzini@gnu.org>
Wed, 30 Nov 2011 00:58:54 +0000 (01:58 +0100)
committerBruno Haible <bruno@clisp.org>
Wed, 30 Nov 2011 00:58:54 +0000 (01:58 +0100)
* tests/test-float.c (test_long_double): Correct and re-enable the
assertion about LDBL_MIN_EXP that was disabled on 2011-08-31.

ChangeLog
tests/test-float.c

index 66a54f0..272dded 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-11-29  Paolo Bonzini  <bonzini@gnu.org>
+
+       float tests: Correct and re-enable assertion about LDBL_MIN_EXP.
+       * tests/test-float.c (test_long_double): Correct and re-enable the
+       assertion about LDBL_MIN_EXP that was disabled on 2011-08-31.
+
 2011-11-29  Matthew Wala  <wala1@illinois.edu>  (tiny change)
 
        Avoid subtracting two pointers that don't point into the same block.
index 57a472f..1d3edbb 100644 (file)
@@ -298,14 +298,7 @@ test_long_double (void)
 
   /* Check that 'long double' is at least as wide as 'double'.  */
   ASSERT (LDBL_MANT_DIG >= DBL_MANT_DIG);
-
-  /* Normally, we would also assert this:
-       ASSERT (LDBL_MIN_EXP <= DBL_MIN_EXP);
-     but at least on powerpc64 with gcc-4.4.4, it would fail:
-     $ :|gcc -dD -E -include stddef.h -|grep -E 'L?DBL_MIN_EXP'
-     #define __DBL_MIN_EXP__ (-1021)
-     #define __LDBL_MIN_EXP__ (-968)
-  */
+  ASSERT (LDBL_MIN_EXP - LDBL_MANT_DIG <= DBL_MIN_EXP - DBL_MANT_DIG);
   ASSERT (LDBL_MAX_EXP >= DBL_MAX_EXP);
 
   /* Check the value of LDBL_DIG.  */