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.
This commit is contained in:
Gary Benson 2020-05-29 14:03:01 +01:00
parent ab7ad28739
commit 735d5a0716
3 changed files with 10 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2020-05-29 Gary Benson <gbenson@redhat.com>
* 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 <gbenson@redhat.com>
* gdb.base/sigaltstack.c (catcher): Add default case to switch

View file

@ -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
}

View file

@ -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
}