-Werror now enabled by default
Joseph Myers
joseph@codesourcery.com
Wed Dec 10 18:37:00 GMT 2014
On Wed, 10 Dec 2014, Adhemerval Zanella wrote:
> Something like that:
>
> diff --git a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c
> index 1961355..641cfd6 100644
> --- a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c
> +++ b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c
> @@ -70,12 +70,16 @@
>
> #include <math.h>
> #include <math_private.h>
> +#include <libc-internal.h>
>
> +DIAG_PUSH_NEEDS_COMMENT;
> +DIAG_IGNORE_NEEDS_COMMENT (4.6, "-Woverflow");
Well, *with the comment* explaining the warning and referring to the
existing open bug for it. Never add diagnostic suppression macros without
appropriate comments explaining the suppression.
> I still trying to figure out why the test for MAXLGM is necessary (it
> seems redundant to me, since for overflow it will be generate by the log
> call itself). Anyway, I know this is not the perfect solution, but I
In some rounding modes, without the MAXLGM test you'd get LDBL_MAX
(finite) as the overflowed result from (x - 0.5L) * __logl (x), and then
adding (negative) q (== ls2pi - x) would result in a return other than
LDBL_MAX, which would not be correct for overflow.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list