From: Gary Benson Date: Fri, 29 May 2020 13:03:01 +0000 (+0100) Subject: Build two gdb.cp testcases with -Wno-unused-comparison X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=735d5a07160bcffaa8e66d4fffecd7f333a0e1fe;p=binutils-gdb.git Build two gdb.cp testcases with -Wno-unused-comparison 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. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 2aa42cd75a3..ed56c819cb0 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2020-05-29 Gary Benson + + * gdb.cp/koenig.exp (prepare_for_testing): Add + additional_flags=-Wno-unused-comparison. + * gdb.cp/operator.exp (prepare_for_testing): Likewise. + 2020-05-28 Gary Benson * gdb.base/sigaltstack.c (catcher): Add default case to switch diff --git a/gdb/testsuite/gdb.cp/koenig.exp b/gdb/testsuite/gdb.cp/koenig.exp index b40ee43f7d0..25be2e5d6b0 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 c2d2bdf6282..b48cd44ad49 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 }