From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2182) id 913B4385DC35; Thu, 28 May 2020 15:30:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 913B4385DC35 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Gary Benson To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Pass -Wno-deprecated-register for gdb.cp that use "register" X-Act-Checkin: binutils-gdb X-Git-Author: Gary Benson X-Git-Refname: refs/heads/master X-Git-Oldrev: f030440daa989ae3dadc1fa4342cfa16d690db3c X-Git-Newrev: 09fe663ed827474bfb73b78d0506cecdcd8ece9d Message-Id: <20200528153005.913B4385DC35@sourceware.org> Date: Thu, 28 May 2020 15:30:05 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 May 2020 15:30:05 -0000 https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=09fe663ed827474bfb73b78d0506cecdcd8ece9d commit 09fe663ed827474bfb73b78d0506cecdcd8ece9d Author: Gary Benson Date: Thu May 28 16:29:48 2020 +0100 Pass -Wno-deprecated-register for gdb.cp that use "register" 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. Diff: --- gdb/testsuite/ChangeLog | 7 +++++++ gdb/testsuite/gdb.cp/classes.exp | 3 ++- gdb/testsuite/gdb.cp/inherit.exp | 3 ++- gdb/testsuite/gdb.cp/misc.exp | 3 ++- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index d5554430bf5..2349c96dfc6 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2020-05-28 Gary Benson + + * 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 * gdb.linespec/cpls-ops.cc (dummy): New static global. diff --git a/gdb/testsuite/gdb.cp/classes.exp b/gdb/testsuite/gdb.cp/classes.exp index beb471c3714..4a2287a8704 100644 --- a/gdb/testsuite/gdb.cp/classes.exp +++ b/gdb/testsuite/gdb.cp/classes.exp @@ -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 } diff --git a/gdb/testsuite/gdb.cp/inherit.exp b/gdb/testsuite/gdb.cp/inherit.exp index 59c72da6ae8..2d4635c96ad 100644 --- a/gdb/testsuite/gdb.cp/inherit.exp +++ b/gdb/testsuite/gdb.cp/inherit.exp @@ -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 } diff --git a/gdb/testsuite/gdb.cp/misc.exp b/gdb/testsuite/gdb.cp/misc.exp index cd6f0f7070a..61034bf8088 100644 --- a/gdb/testsuite/gdb.cp/misc.exp +++ b/gdb/testsuite/gdb.cp/misc.exp @@ -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 }