gcc2: fix LDBL_MIN, LDBL_MAX, and LDBL_EPSILON
While the union trick used there gave the correct results, it made the
defines non-constants so they couldn't be used properly in some cases.
In particular, this makes the testsuite for gettext and some other GNU
packages fail as they explicitly test for these being constants.
Diff
legacy/gcc/gcc/config/float-i386.h | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
@@ -74,20 +74,13 @@
#define LDBL_DIG 18
#undef LDBL_EPSILON
#ifndef __LDBL_UNION__
#define __LDBL_UNION__
union __convert_long_double {
unsigned __convert_long_double_i[4];
long double __convert_long_double_d;
};
#endif
#define LDBL_EPSILON (__extension__ ((union __convert_long_double) {__convert_long_double_i: {0x0, 0x80000000, 0x3fc0, 0x0}}).__convert_long_double_d)
#define LDBL_EPSILON 0x1p-63l
#undef LDBL_MIN_EXP
#define LDBL_MIN_EXP (-16381)
#undef LDBL_MIN
#define LDBL_MIN (__extension__ ((union __convert_long_double) {__convert_long_double_i: {0x0, 0x80000000, 0x1, 0x0}}).__convert_long_double_d)
#define LDBL_MIN 0x1p-16382l
#undef LDBL_MIN_10_EXP
#define LDBL_MIN_10_EXP (-4931)
@@ -96,7 +89,7 @@
#define LDBL_MAX_EXP 16384
#undef LDBL_MAX
#define LDBL_MAX (__extension__ ((union __convert_long_double) {__convert_long_double_i: {0xffffffff, 0xffffffff, 0x107ffe, 0x0}}).__convert_long_double_d)
#define LDBL_MAX 0xfffffffffffffffp16320l
#undef LDBL_MAX_10_EXP
#define LDBL_MAX_10_EXP 4932