c6d234
commit 9d96909913249f7b1ff9f503f8fa8abc458089a9
c6d234
Author: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
c6d234
Date:   Thu Dec 11 07:17:11 2014 -0500
c6d234
c6d234
    powerpc: Fix lgammal_r overflow warnings
c6d234
    
c6d234
    ldbl-128ibm uses ldbl-128 e_lgammal_r implementation as is, however some
c6d234
    constants definitions overflows for IBM long double range.  This patch
c6d234
    suppress the compiler warnings until the ldbl-128ibm implementation is
c6d234
    fixed.
c6d234
c6d234
diff --git a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c
c6d234
index 2b44afb759695f11..39c38b4b6bf1daad 100644
c6d234
--- a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c
c6d234
+++ b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c
c6d234
@@ -70,12 +70,20 @@
c6d234
 
c6d234
 #include <math.h>
c6d234
 #include <math_private.h>
c6d234
+#include <libc-internal.h>
c6d234
+#include <float.h>
c6d234
 
c6d234
+/* BZ#16347: ldbl-128ibm uses this file as is, however the MAXLGM
c6d234
+   definition overflows for IBM long double.  This directive prevents the
c6d234
+   overflow warnings until IBM long double version is fixed.  */
c6d234
 static const long double PIL = 3.1415926535897932384626433832795028841972E0L;
c6d234
+DIAG_PUSH_NEEDS_COMMENT;
c6d234
+DIAG_IGNORE_NEEDS_COMMENT (4.6, "-Woverflow");
c6d234
 static const long double MAXLGM = 1.0485738685148938358098967157129705071571E4928L;
c6d234
+DIAG_POP_NEEDS_COMMENT;
c6d234
 static const long double one = 1.0L;
c6d234
 static const long double zero = 0.0L;
c6d234
-static const long double huge = 1.0e4000L;
c6d234
+static const long double huge = LDBL_MAX;
c6d234
 
c6d234
 /* log gamma(x) = ( x - 0.5 ) * log(x) - x + LS2PI + 1/x P(1/x^2)
c6d234
    1/x <= 0.0741 (x >= 13.495...)