From: Matheus Castanho <msc@linux.ibm.com>
To: libc-alpha@sourceware.org
Subject: [PATCH] Fix maybe-uninitialized error on powerpc
Date: Thu, 9 Jan 2020 15:27:05 -0300 [thread overview]
Message-ID: <20200109182705.5309-1-msc@linux.ibm.com> (raw)
The build has been failing on powerpc64le-linux-gnu with GCC 10
due to a maybe-uninitialized error:
../sysdeps/ieee754/dbl-64/mpa.c:875:6: error: ‘w.e’ may be used
uninitialized in this function [-Werror=maybe-uninitialized]
875 | EY -= EX;
| ^~
This commits adds proper initialization to avoid it.
Tested on powerpc64le.
---
sysdeps/ieee754/dbl-64/mpa.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sysdeps/ieee754/dbl-64/mpa.c b/sysdeps/ieee754/dbl-64/mpa.c
index 3bb8bff90d..8ad0fc7535 100644
--- a/sysdeps/ieee754/dbl-64/mpa.c
+++ b/sysdeps/ieee754/dbl-64/mpa.c
@@ -895,6 +895,7 @@ SECTION
__dvd (const mp_no *x, const mp_no *y, mp_no *z, int p)
{
mp_no w;
+ w.e = 0;
if (X[0] == 0)
Z[0] = 0;
--
2.21.1
next reply other threads:[~2020-01-09 18:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-09 18:27 Matheus Castanho [this message]
2020-01-09 18:48 ` [PATCH] Fix maybe-uninitialized error on powerpc Joseph Myers
2020-01-13 13:47 ` Matheus Castanho
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/libc/involved.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200109182705.5309-1-msc@linux.ibm.com \
--to=msc@linux.ibm.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).