From: Gary Benson <gbenson@redhat.com>
To: gdb-patches@sourceware.org
Subject: [OB PATCH] Fix gdb.arch/i386-sse.exp with clang
Date: Mon, 13 Jul 2020 15:15:37 +0100 [thread overview]
Message-ID: <1594649737-24086-1-git-send-email-gbenson@redhat.com> (raw)
Hi all,
gdb.arch/i386-sse.exp fails to run with clang, because of:
gdb compile failed, /gdbtest/src/gdb/testsuite/gdb.arch/i386-sse.c:56:40: warning:
passing 'int *' to parameter of type 'unsigned int *' converts between
pointers to integer types with different sign [-Wpointer-sign]
if (!x86_cpuid (1, NULL, NULL, NULL, &edx))
^~~~
/gdbtest/src/gdb/testsuite/../nat/x86-cpuid.h:35:41: note: passing
argument to parameter '__edx' here
unsigned int *__ecx, unsigned int *__edx)
^
1 warning generated.
Fix it by declaring edx unsigned.
Checked on Fedora 31 x86_64, GCC and clang, pushed as obvious.
Cheers,
Gary
--
gdb/testsuite/ChangeLog:
* gdb.arch/i386-sse.c (have_sse) <edx>: Make unsigned.
---
gdb/testsuite/ChangeLog | 4 ++++
gdb/testsuite/gdb.arch/i386-sse.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/gdb/testsuite/gdb.arch/i386-sse.c b/gdb/testsuite/gdb.arch/i386-sse.c
index 72250e0..bd9bc1a 100644
--- a/gdb/testsuite/gdb.arch/i386-sse.c
+++ b/gdb/testsuite/gdb.arch/i386-sse.c
@@ -51,7 +51,7 @@
int
have_sse (void)
{
- int edx;
+ unsigned int edx;
if (!x86_cpuid (1, NULL, NULL, NULL, &edx))
return 0;
--
1.8.3.1
reply other threads:[~2020-07-13 14:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1594649737-24086-1-git-send-email-gbenson@redhat.com \
--to=gbenson@redhat.com \
--cc=gdb-patches@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).