diff options
author | Adhemerval Zanella <azanella@linux.vnet.ibm.com> | 2014-12-11 07:17:11 -0500 |
---|---|---|
committer | Adhemerval Zanella <azanella@linux.vnet.ibm.com> | 2014-12-11 07:17:11 -0500 |
commit | 9d96909913249f7b1ff9f503f8fa8abc458089a9 (patch) | |
tree | c315f51dcd4c843872af9893b43a61c7a7e7f044 | |
parent | e2dd138e21c8924ff1509cb4b0b5a31d9a096e06 (diff) | |
download | glibc-9d96909913249f7b1ff9f503f8fa8abc458089a9.tar.gz glibc-9d96909913249f7b1ff9f503f8fa8abc458089a9.tar.xz glibc-9d96909913249f7b1ff9f503f8fa8abc458089a9.zip |
powerpc: Fix lgammal_r overflow warnings
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.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | sysdeps/ieee754/ldbl-128/e_lgammal_r.c | 10 |
2 files changed, 14 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index ef4b50e98e..37da9a7e34 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2014-12-11 Adhemerval Zanella <azanella@linux.vnet.ibm.com> + + * sysdeps/ieee754/ldbl-128/e_lgammal_r.c: Remove overflow warnings for + constants definition. + 2014-12-11 Andreas Schwab <schwab@suse.de> [BZ #16657] diff --git a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c index 1961355a73..35d4a663ff 100644 --- a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c +++ b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c @@ -70,12 +70,20 @@ #include <math.h> #include <math_private.h> +#include <libc-internal.h> +#include <float.h> +/* BZ#16347: ldbl-128ibm uses this file as is, however the MAXLGM + definition overflows for IBM long double. This directive prevents the + overflow warnings until IBM long double version is fixed. */ static const long double PIL = 3.1415926535897932384626433832795028841972E0L; +DIAG_PUSH_NEEDS_COMMENT; +DIAG_IGNORE_NEEDS_COMMENT (4.6, "-Woverflow"); static const long double MAXLGM = 1.0485738685148938358098967157129705071571E4928L; +DIAG_POP_NEEDS_COMMENT; static const long double one = 1.0L; static const long double zero = 0.0L; -static const long double huge = 1.0e4000L; +static const long double huge = LDBL_MAX; /* log gamma(x) = ( x - 0.5 ) * log(x) - x + LS2PI + 1/x P(1/x^2) 1/x <= 0.0741 (x >= 13.495...) |