When running test-case gdb.mi/print-simple-values.exp with gcc 4.8.4, I run
into a compilation failure due to the test-case requiring c++11 and the
compiler defaulting to less than that.
Fix this by compiling with -std=c++11.
Likewise in a few other test-cases.
Tested on x86_64-linux.
standard_testfile index.cc
+set opts {}
+lappend opts debug
+lappend opts additional_flags=-std=c++11
+
if {[prepare_for_testing "failed to prepare" "${testfile}" \
- [list ${srcfile}]]} {
+ [list ${srcfile}] $opts]} {
return -1
}
standard_testfile .cc
-if [prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}] {
+set opts {}
+lappend opts debug
+lappend opts c++
+lappend opts additional_flags=-std=c++11
+
+if [prepare_for_testing "failed to prepare" $testfile $srcfile $opts] {
return -1
}
if {[prepare_for_testing_full "failed to prepare" \
[list ${binfile} {debug f90 additional_flags=-lstdc++} \
$srcfile {debug} \
- $srcfile2 {debug c++} \
+ $srcfile2 {debug c++ additional_flags=-std=c++11} \
$srcfile3 {debug f90}]]} {
return -1
}
standard_testfile cpls.cc cpls2.cc cpls-hyphen.cc
+set opts {}
+lappend opts debug
+lappend opts additional_flags=-std=c++11
+
if {[prepare_for_testing "failed to prepare" $testfile \
- [list $srcfile $srcfile2 $srcfile3] {debug}]} {
+ [list $srcfile $srcfile2 $srcfile3] $opts]} {
return -1
}
standard_testfile .cc
-if [build_executable "failed to prepare" $testfile $srcfile {debug c++}] {
+set opts {}
+lappend opts debug
+lappend opts c++
+lappend opts additional_flags=-std=c++11
+
+if [build_executable "failed to prepare" $testfile $srcfile $opts] {
return -1
}