diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index a19af885d3..2e35f6cdf1 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2020-09-25 Gary Benson + + * gdb.base/infcall-nested-structs.exp.tcl: Add + additional_flags=-Wno-tautological-compare for C++ + tests when compiling using Clang. + 2020-09-25 Gary Benson * lib/gdb.exp (gdb_compile): Pass "-x c++" earlier, and only diff --git a/gdb/testsuite/gdb.base/infcall-nested-structs.exp.tcl b/gdb/testsuite/gdb.base/infcall-nested-structs.exp.tcl index f7409612f8..907abe7ee8 100644 --- a/gdb/testsuite/gdb.base/infcall-nested-structs.exp.tcl +++ b/gdb/testsuite/gdb.base/infcall-nested-structs.exp.tcl @@ -33,6 +33,13 @@ if [support_complex_tests] { lappend compile_flags "additional_flags=-Wno-psabi" } +if { $lang == "c++" && [test_compiler_info clang*] } { + # Clang rightly deduces that the static member tests are + # tautological comparisons, so we need to inhibit that + # particular warning in order to build. + lappend compile_flags "additional_flags=-Wno-tautological-compare" +} + # Given N (0..25), return the corresponding alphabetic letter in upper # case.