SHA256
1
0
forked from pool/findutils
findutils/LDBL_MAX-gcc4.4.patch

37 lines
1.7 KiB
Diff

| From: Werner Fink <werner@suse.de>
| Date: Mon, 14 Mar 2016 14:20:51 +0000
|
| Is this wrong value of LDBL_MAX still valid got gcc > 4
| Compare with
| https://lists.gnu.org/archive/html/bug-gnulib/2016-01/msg00011.html
|
---
gl/lib/float.in.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- gl/lib/float.in.h
+++ gl/lib/float.in.h 2016-03-14 14:15:45.616871084 +0000
@@ -112,21 +112,21 @@ extern const union gl_long_double_union
wrong.
On Linux/PowerPC with gcc 4.4, the value of LDBL_MAX is wrong. */
#if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
# undef LDBL_MIN_EXP
# define LDBL_MIN_EXP DBL_MIN_EXP
# undef LDBL_MIN_10_EXP
# define LDBL_MIN_10_EXP DBL_MIN_10_EXP
# undef LDBL_MIN
# define LDBL_MIN 2.22507385850720138309023271733240406422e-308L /* DBL_MIN = 2^-1022 */
#endif
-#if (defined _ARCH_PPC || defined _POWER) && (defined _AIX || defined __linux__) && (LDBL_MANT_DIG == 106) && defined __GNUC__
+#if (defined _ARCH_PPC || defined _POWER) && (defined _AIX || defined __linux__) && (LDBL_MANT_DIG == 106) && (defined(__GNUC__) && (__GNUC__ == 4 && __GNUC_MINOR__ == 4))
# undef LDBL_MAX
/* LDBL_MAX is represented as { 0x7FEFFFFF, 0xFFFFFFFF, 0x7C8FFFFF, 0xFFFFFFFF }.
It is not easy to define:
#define LDBL_MAX 1.79769313486231580793728971405302307166e308L
is too small, whereas
#define LDBL_MAX 1.79769313486231580793728971405302307167e308L
is too large. Apparently a bug in GCC decimal-to-binary conversion.
Also, I can't get values larger than
#define LDBL63 ((long double) (1ULL << 63))
#define LDBL882 (LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63)