On 08/31/2011 05:48 PM, Jim Meyering wrote:
The test-float test is failing on ppc64 with:

     gcc version 4.4.4 20100630 (Red Hat 4.4.4-10) (GCC)
     (albeit an aging Fedora 12 system)

due to the failure of this assertion:

     ASSERT (LDBL_MIN_EXP<= DBL_MIN_EXP);

It fails because of these numbers:

     $ :|gcc -dD -E -include stddef.h -|grep -E 'L?DBL_MIN_EXP'
     #define __DBL_MIN_EXP__ (-1021)
     #define __LDBL_MIN_EXP__ (-968)

It looks like the right test would be

ASSERT (LDBL_MIN_EXP - LDBL_MANT_DIG <= DBL_MIN_EXP - DBL_MANT_DIG);

This would be enough to assert that a double can be assigned to a long double.

Paolo

Reply via email to