[OB PATCH] Build two gdb.cp testcases with -Wno-unused-comparison
Gary Benson
gbenson@redhat.com
Fri May 29 13:03:43 GMT 2020
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
More information about the Gdb-patches
mailing list