This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] powerpc: Fix lgammal_r overflow warnings
- From: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- To: "GNU C. Library" <libc-alpha at sourceware dot org>
- Date: Wed, 10 Dec 2014 16:49:00 -0200
- Subject: [PATCH] powerpc: Fix lgammal_r overflow warnings
- Authentication-results: sourceware.org; auth=none
ldbl-128ibm uses ldbl-128 e_lgammal_r implementation as is, however some
constants definitions overflows for IBM long double range. This patch
suppress the compiler warnings until the ldbl-128ibm implementation is
fixed.
Tested on powerpc64 and powerpc32 (the build itself still fails, however
the lgammal objects are compiled).
--
* sysdeps/ieee754/ldbl-128/e_lgammal_r.c: Remove overflow warnings for
constants definition.
--
diff --git a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c
index 1961355..43f7019 100644
--- a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c
+++ b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c
@@ -70,12 +70,19 @@
#include <math.h>
#include <math_private.h>
+#include <libc-internal.h>
+/* ldbl-128ibm uses this file as is, however the MAXLGM and huge definition
+ overflows for IBM long double. This directive prevents the overflow
+ warnings until IBM long double version is not fixed. */
+DIAG_PUSH_NEEDS_COMMENT;
+DIAG_IGNORE_NEEDS_COMMENT (4.6, "-Woverflow");
static const long double PIL = 3.1415926535897932384626433832795028841972E0L;
static const long double MAXLGM = 1.0485738685148938358098967157129705071571E4928L;
static const long double one = 1.0L;
static const long double zero = 0.0L;
static const long double huge = 1.0e4000L;
+DIAG_POP_NEEDS_COMMENT;
/* log gamma(x) = ( x - 0.5 ) * log(x) - x + LS2PI + 1/x P(1/x^2)
1/x <= 0.0741 (x >= 13.495...)