From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 59220 invoked by alias); 21 May 2019 14:34:12 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 59212 invoked by uid 89); 21 May 2019 14:34:12 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.0 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 21 May 2019 14:34:10 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id A2D7BAF3F for ; Tue, 21 May 2019 14:34:08 +0000 (UTC) Date: Tue, 21 May 2019 14:34:00 -0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Require c++11 where necessary Message-ID: <20190521143405.GA21005@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-IsSubscribed: yes X-SW-Source: 2019-05/txt/msg00472.txt.bz2 Hi, When building gdb on ubuntu 16.04 with gcc 5.4.0, and running the gdb testsuite we run into failures due test-cases requiring at least c++11. Fix this by adding -std=c++11 to those test-cases. Tested on x86_64-linux. Committed to trunk. Thanks, - Tom [gdb/testsuite] Require c++11 where necessary gdb/testsuite/ChangeLog: 2019-05-21 Tom de Vries * gdb.arch/amd64-eval.exp: Require c++11. * gdb.base/max-depth.exp: Same. * gdb.compile/compile-cplus-array-decay.exp: Same. * gdb.cp/meth-typedefs.exp: Same. * gdb.cp/subtypes.exp: Same. * gdb.cp/temargs.exp: Same. --- gdb/testsuite/gdb.arch/amd64-eval.exp | 2 +- gdb/testsuite/gdb.base/max-depth.exp | 3 +++ gdb/testsuite/gdb.compile/compile-cplus-array-decay.exp | 2 +- gdb/testsuite/gdb.cp/meth-typedefs.exp | 3 ++- gdb/testsuite/gdb.cp/subtypes.exp | 3 ++- gdb/testsuite/gdb.cp/temargs.exp | 3 ++- 6 files changed, 11 insertions(+), 5 deletions(-) diff --git a/gdb/testsuite/gdb.arch/amd64-eval.exp b/gdb/testsuite/gdb.arch/amd64-eval.exp index beef46ad13..4b5c28e7ce 100644 --- a/gdb/testsuite/gdb.arch/amd64-eval.exp +++ b/gdb/testsuite/gdb.arch/amd64-eval.exp @@ -20,7 +20,7 @@ standard_testfile .cc if { [prepare_for_testing "failed to prepare" $testfile $srcfile \ - { debug c++ }] } { + { debug c++ additional_flags=-std=c++11 }] } { return -1 } diff --git a/gdb/testsuite/gdb.base/max-depth.exp b/gdb/testsuite/gdb.base/max-depth.exp index b3b78762eb..99f3c98d8f 100644 --- a/gdb/testsuite/gdb.base/max-depth.exp +++ b/gdb/testsuite/gdb.base/max-depth.exp @@ -39,6 +39,9 @@ proc compile_and_run_tests { lang } { # Create the additional flags. set flags "debug" lappend flags $lang + if { "$lang" == "c++" } { + lappend flags "additional_flags=-std=c++11" + } set dir "$lang" set binfile [standard_output_file ${dir}/${testfile}] diff --git a/gdb/testsuite/gdb.compile/compile-cplus-array-decay.exp b/gdb/testsuite/gdb.compile/compile-cplus-array-decay.exp index 80be4c2ac6..2f2f1c31af 100644 --- a/gdb/testsuite/gdb.compile/compile-cplus-array-decay.exp +++ b/gdb/testsuite/gdb.compile/compile-cplus-array-decay.exp @@ -25,7 +25,7 @@ if {[skip_cplus_tests]} { } if {[prepare_for_testing $testfile $testfile $srcfile \ - {debug nowarnings c++}]} { + {debug nowarnings c++ additional_flags=-std=c++11}]} { return -1 } diff --git a/gdb/testsuite/gdb.cp/meth-typedefs.exp b/gdb/testsuite/gdb.cp/meth-typedefs.exp index 76a8fc9780..0883154584 100644 --- a/gdb/testsuite/gdb.cp/meth-typedefs.exp +++ b/gdb/testsuite/gdb.cp/meth-typedefs.exp @@ -35,7 +35,8 @@ if {[skip_cplus_tests]} { continue } # Tests for c++/12266 et al standard_testfile .cc -if {[prepare_for_testing "failed to prepare" $testfile $srcfile {c++ debug}]} { +if {[prepare_for_testing "failed to prepare" $testfile $srcfile \ + {c++ debug additional_flags=-std=c++11}]} { return -1 } diff --git a/gdb/testsuite/gdb.cp/subtypes.exp b/gdb/testsuite/gdb.cp/subtypes.exp index 913006cf50..a0b6bcd0ef 100644 --- a/gdb/testsuite/gdb.cp/subtypes.exp +++ b/gdb/testsuite/gdb.cp/subtypes.exp @@ -23,7 +23,8 @@ load_lib "cp-support.exp" standard_testfile .cc subtypes-2.cc if {[prepare_for_testing "failed to prepare" $testfile \ - [list $srcfile $srcfile2] {debug c++}]} { + [list $srcfile $srcfile2] \ + {debug c++ additional_flags=-std=c++11}]} { return -1 } diff --git a/gdb/testsuite/gdb.cp/temargs.exp b/gdb/testsuite/gdb.cp/temargs.exp index 702e972ed6..a1fbaf1d11 100644 --- a/gdb/testsuite/gdb.cp/temargs.exp +++ b/gdb/testsuite/gdb.cp/temargs.exp @@ -23,7 +23,8 @@ if {[skip_cplus_tests]} { 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=-std=c++11}]} { return -1 }