This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.21-394-g31a8780
- From: jsm28 at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 22 May 2015 17:49:13 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.21-394-g31a8780
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 31a8780d0b41934c6ab5160f834f56a2d5d97f4a (commit)
from fded7ed684b17e42a5cc5434e799166ca2df1643 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=31a8780d0b41934c6ab5160f834f56a2d5d97f4a
commit 31a8780d0b41934c6ab5160f834f56a2d5d97f4a
Author: Joseph Myers <joseph@codesourcery.com>
Date: Fri May 22 17:48:45 2015 +0000
Fix ldbl-128 / ldbl-128ibm erfcl for -Wuninitialized
The ldbl-128 and ldbl-128ibm implementations of erfcl produce
uninitialized variable warnings with -Wuninitialized because of switch
statements where in fact one of the cases will always be executed, but
the compiler does not see that these cases cover all possibilities
(and because the reasoning that it does involves inequalities on the
representation of a floating point value leading to a set of possible
values for 8.0 times that value, converted to int, it's highly
nontrivial for the compiler to see that). This patch fixes those
warnings by converting the last case in those switch statements to a
"default" case.
Tested for powerpc and mips64.
* sysdeps/ieee754/ldbl-128/s_erfl.c (__erfcl): Make case 9 in
switch statement into default case.
* sysdeps/ieee754/ldbl-128ibm/s_erfl.c (__erfcl): Likewise.
diff --git a/ChangeLog b/ChangeLog
index 21c4fa6..5b31961 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2015-05-22 Joseph Myers <joseph@codesourcery.com>
+ * sysdeps/ieee754/ldbl-128/s_erfl.c (__erfcl): Make case 9 in
+ switch statement into default case.
+ * sysdeps/ieee754/ldbl-128ibm/s_erfl.c (__erfcl): Likewise.
+
* sysdeps/ieee754/ldbl-128/e_asinl.c (__ieee754_asinl): Don't use
a conditional in forcing "inexact".
* sysdeps/ieee754/ldbl-128ibm/e_asinl.c (__ieee754_asinl):
diff --git a/sysdeps/ieee754/ldbl-128/s_erfl.c b/sysdeps/ieee754/ldbl-128/s_erfl.c
index 9bfc9c5..fa4609f 100644
--- a/sysdeps/ieee754/ldbl-128/s_erfl.c
+++ b/sysdeps/ieee754/ldbl-128/s_erfl.c
@@ -874,7 +874,7 @@ __erfcl (long double x)
y = C19b + z * neval (z, RNr19, NRNr19) / deval (z, RDr19, NRDr19);
y += C19a;
break;
- case 9:
+ default: /* i == 9. */
z = x - 1.125L;
y = C20b + z * neval (z, RNr20, NRNr20) / deval (z, RDr20, NRDr20);
y += C20a;
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_erfl.c b/sysdeps/ieee754/ldbl-128ibm/s_erfl.c
index f55e8b7..f6fcf48 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_erfl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_erfl.c
@@ -894,7 +894,7 @@ __erfcl (long double x)
y = C19b + z * neval (z, RNr19, NRNr19) / deval (z, RDr19, NRDr19);
y += C19a;
break;
- case 9:
+ default: /* i == 9. */
z = x - 1.125L;
y = C20b + z * neval (z, RNr20, NRNr20) / deval (z, RDr20, NRDr20);
y += C20a;
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 4 ++++
sysdeps/ieee754/ldbl-128/s_erfl.c | 2 +-
sysdeps/ieee754/ldbl-128ibm/s_erfl.c | 2 +-
3 files changed, 6 insertions(+), 2 deletions(-)
hooks/post-receive
--
GNU C Library master sources