diff options
author | Gary Benson <gbenson@redhat.com> | 2020-07-13 15:14:07 +0100 |
---|---|---|
committer | Gary Benson <gbenson@redhat.com> | 2020-07-13 15:14:07 +0100 |
commit | 915771bb8a8c14fce7af0d45967b955d0adc830b (patch) | |
tree | 1197927a7668b26bec872325220dcee8479cda45 /gdb | |
parent | 0a5c31d1ac2da51fae02f42196873f06b05e73be (diff) | |
download | gdb-915771bb8a8c14fce7af0d45967b955d0adc830b.zip gdb-915771bb8a8c14fce7af0d45967b955d0adc830b.tar.gz gdb-915771bb8a8c14fce7af0d45967b955d0adc830b.tar.bz2 |
Fix gdb.arch/i386-sse.exp with clang
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.
gdb/testsuite/ChangeLog:
* gdb.arch/i386-sse.c (have_sse) <edx>: Make unsigned.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.arch/i386-sse.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index fc9dcac..8fa0a46 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,9 @@ 2020-07-13 Gary Benson <gbenson@redhat.com> + * gdb.arch/i386-sse.c (have_sse) <edx>: Make unsigned. + +2020-07-13 Gary Benson <gbenson@redhat.com> + * gdb.base/bigcore.c (main): Use a volatile pointer when attempting to trigger a SIGSEGV. * gdb.base/gcore-relro-pie.c (break_here): Likewise. 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 @@ v4sf_t data[] = int have_sse (void) { - int edx; + unsigned int edx; if (!x86_cpuid (1, NULL, NULL, NULL, &edx)) return 0; |