From: Gary Benson <gbenson@redhat.com>
To: gdb-patches@sourceware.org
Subject: [OB PATCH] Build two gdb.cp testcases with -Wno-unused-comparison
Date: Fri, 29 May 2020 14:03:43 +0100 [thread overview]
Message-ID: <1590757423-18004-1-git-send-email-gbenson@redhat.com> (raw)
Clang fails to compile two testcases with the following error:
warning: equality comparison result unused [-Wunused-comparison]
This prevents the following testcases from executing:
gdb.cp/koenig.exp
gdb.cp/operator.exp
This commit builds those testcases with -Wno-unused-comparison, to
avoid the failure. Note that this commit reveals a new failure,
"FAIL: gdb.cp/koenig.exp: p foo (p_union)" when the testsuite is
compiled using clang.
gdb/testsuite/ChangeLog:
* gdb.cp/koenig.exp (prepare_for_testing): Add
additional_flags=-Wno-unused-comparison.
* gdb.cp/operator.exp (prepare_for_testing): Likewise.
---
gdb/testsuite/ChangeLog | 6 ++++++
gdb/testsuite/gdb.cp/koenig.exp | 3 ++-
gdb/testsuite/gdb.cp/operator.exp | 3 ++-
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/gdb/testsuite/gdb.cp/koenig.exp b/gdb/testsuite/gdb.cp/koenig.exp
index b40ee43..25be2e5 100644
--- a/gdb/testsuite/gdb.cp/koenig.exp
+++ b/gdb/testsuite/gdb.cp/koenig.exp
@@ -15,7 +15,8 @@
standard_testfile .cc
-if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug c++}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
+ {debug c++ additional_flags=-Wno-unused-comparison}] } {
return -1
}
diff --git a/gdb/testsuite/gdb.cp/operator.exp b/gdb/testsuite/gdb.cp/operator.exp
index c2d2bdf..b48cd44 100644
--- a/gdb/testsuite/gdb.cp/operator.exp
+++ b/gdb/testsuite/gdb.cp/operator.exp
@@ -15,7 +15,8 @@
standard_testfile .cc
-if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug c++}] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
+ {debug c++ additional_flags=-Wno-unused-comparison}] } {
return -1
}
--
1.8.3.1
next reply other threads:[~2020-05-29 13:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-29 13:03 Gary Benson [this message]
2020-05-29 18:08 ` Tom Tromey
2020-05-29 18:31 ` Pedro Alves
2020-06-16 12:42 ` Gary Benson
2020-06-16 15:11 ` Pedro Alves
2020-06-17 17:29 ` Gary Benson
2020-06-17 19:53 ` [PATCH] W/ Clang, compile C/C++ testcases with -Wno-unknown-warning-option Pedro Alves
2020-06-18 16:18 ` Gary Benson
2020-06-24 22:26 ` Pedro Alves
2020-07-02 10:02 ` Gary Benson
2020-06-16 12:38 ` [OB PATCH] Build two gdb.cp testcases with -Wno-unused-comparison Gary Benson
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=1590757423-18004-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).