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-386-g89f3b6e
- From: jsm28 at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 21 May 2015 23:06:46 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.21-386-g89f3b6e
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 89f3b6e18c6e7833438789746fcfc2e7189f7cac (commit)
from 9d12d7652b830635528639ece2206ecf5bb9ffbf (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=89f3b6e18c6e7833438789746fcfc2e7189f7cac
commit 89f3b6e18c6e7833438789746fcfc2e7189f7cac
Author: Joseph Myers <joseph@codesourcery.com>
Date: Thu May 21 23:05:45 2015 +0000
Fix sysdeps/ieee754/dbl-64/mpa.c for -Wuninitialized.
If you remove the "override CFLAGS += -Wno-uninitialized" in
math/Makefile, one of the errors you get is:
../sysdeps/ieee754/dbl-64/mpa.c: In function '__mp_dbl.part.0':
../sysdeps/ieee754/dbl-64/mpa.c:183:5: error: 'c' may be used uninitialized in this function [-Werror=maybe-uninitialized]
c *= X[0];
The problem is that the p < 5 case initializes c if p is 1, 2, 3 or 4
but not otherwise, and in fact p is positive for all calls to this
function so the uninitialized case can't actually occur. This patch
replaces the "if (p == 4)" last case with a comment so the compiler
can see that all paths do initialize c.
Tested for x86_64.
* sysdeps/ieee754/dbl-64/mpa.c (norm): Remove if condition on
(p == 4) case.
diff --git a/ChangeLog b/ChangeLog
index d61c222..bca6ba7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2015-05-21 Joseph Myers <joseph@codesourcery.com>
+ * sysdeps/ieee754/dbl-64/mpa.c (norm): Remove if condition on
+ (p == 4) case.
+
* conform/linknamespace.pl (@whitelist): Add re_syntax_options.
* conform/Makefile (test-xfail-UNIX98/regex.h/linknamespace):
Remove variable.
diff --git a/sysdeps/ieee754/dbl-64/mpa.c b/sysdeps/ieee754/dbl-64/mpa.c
index 7d6b0c5..7b52da9 100644
--- a/sysdeps/ieee754/dbl-64/mpa.c
+++ b/sysdeps/ieee754/dbl-64/mpa.c
@@ -119,7 +119,8 @@ __cpy (const mp_no *x, mp_no *y, int p)
#ifndef NO___MP_DBL
/* Convert a multiple precision number *X into a double precision
- number *Y, normalized case (|x| >= 2**(-1022))). */
+ number *Y, normalized case (|x| >= 2**(-1022))). X has precision
+ P, which is positive. */
static void
norm (const mp_no *x, double *y, int p)
{
@@ -135,7 +136,7 @@ norm (const mp_no *x, double *y, int p)
c = X[1] + R * X[2];
else if (p == 3)
c = X[1] + R * (X[2] + R * X[3]);
- else if (p == 4)
+ else /* p == 4. */
c = (X[1] + R * X[2]) + R * R * (X[3] + R * X[4]);
}
else
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 3 +++
sysdeps/ieee754/dbl-64/mpa.c | 5 +++--
2 files changed, 6 insertions(+), 2 deletions(-)
hooks/post-receive
--
GNU C Library master sources