Pass -Wno-deprecated-register for gdb.cp that use "register"
authorGary Benson <gbenson@redhat.com>
Thu, 28 May 2020 15:29:48 +0000 (16:29 +0100)
committerGary Benson <gbenson@redhat.com>
Thu, 28 May 2020 15:29:48 +0000 (16:29 +0100)
Clang fails to compile three testcases with the following error:
  warning: 'register' storage class specifier is deprecated and
    incompatible with C++17 [-Wdeprecated-register]

This prevents the following testcases from executing:
  gdb.cp/classes.exp
  gdb.cp/inherit.exp
  gdb.cp/misc.exp

This commit builds those testcases with -Wno-deprecated-register, to
avoid the failure.  Note that this commit reveals five "wrong access
specifier for typedef" failures in gdb.cp/classes.exp when compiling
the testsuite with clang.

gdb/testsuite/ChangeLog:

* gdb.cp/classes.exp (prepare_for_testing): Add
additional_flags=-Wno-deprecated-register.
* gdb.cp/inherit.exp (prepare_for_testing): Likewise.
* gdb.cp/misc.exp: Likewise.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.cp/classes.exp
gdb/testsuite/gdb.cp/inherit.exp
gdb/testsuite/gdb.cp/misc.exp

index d5554430bf5df24eb0770107f370947ed7352df5..2349c96dfc6dfb150cde90e9817eb24dcfc67063 100644 (file)
@@ -1,3 +1,10 @@
+2020-05-28  Gary Benson <gbenson@redhat.com>
+
+       * gdb.cp/classes.exp (prepare_for_testing): Add
+       additional_flags=-Wno-deprecated-register.
+       * gdb.cp/inherit.exp (prepare_for_testing): Likewise.
+       * gdb.cp/misc.exp: Likewise.
+
 2020-05-28  Gary Benson <gbenson@redhat.com>
 
        * gdb.linespec/cpls-ops.cc (dummy): New static global.
index beb471c3714244488cf91513b1419db4c5e059da..4a2287a8704f410b2e3a4e84b9ed7536755f3df6 100644 (file)
@@ -24,7 +24,8 @@ load_lib "cp-support.exp"
 
 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-deprecated-register}]} {
     return -1
 }
 
index 59c72da6ae8645a4b50afd23b2f9e52d7491be6d..2d4635c96ad0416987041800284d9ee835351c68 100644 (file)
@@ -26,7 +26,8 @@ load_lib "cp-support.exp"
 
 standard_testfile misc.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-deprecated-register}]} {
     return -1
 }
 
index cd6f0f7070abcf20540c2dd6b705cfee31f7a11d..61034bf808866ab1acd82d80f92987bf1e2fbdf2 100644 (file)
@@ -19,7 +19,8 @@ if { [skip_cplus_tests] } { continue }
 
 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-deprecated-register}]} {
     return -1
 }
 
This page took 0.030744 seconds and 4 git commands to generate.