summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/testsuite')
-rw-r--r--libstdc++-v3/testsuite/18_support/exception_ptr/lifespan.cc26
-rw-r--r--libstdc++-v3/testsuite/lib/libstdc++.exp10
2 files changed, 22 insertions, 14 deletions
diff --git a/libstdc++-v3/testsuite/18_support/exception_ptr/lifespan.cc b/libstdc++-v3/testsuite/18_support/exception_ptr/lifespan.cc
index 704f77e695b..b417ea68e17 100644
--- a/libstdc++-v3/testsuite/18_support/exception_ptr/lifespan.cc
+++ b/libstdc++-v3/testsuite/18_support/exception_ptr/lifespan.cc
@@ -150,11 +150,14 @@ void test06()
may_destruct = false;
- try {
- test06_helper();
- } catch(...) {
- may_destruct = true;
- }
+ try
+ {
+ test06_helper();
+ }
+ catch(...)
+ {
+ may_destruct = true;
+ }
may_destruct = false;
}
@@ -167,11 +170,14 @@ void test99()
may_destruct = false;
- try {
- throw destructing();
- } catch(...) {
- gep = current_exception();
- }
+ try
+ {
+ throw destructing();
+ }
+ catch(...)
+ {
+ gep = current_exception();
+ }
}
int main()
diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp
index e4191925546..abb92bf358d 100644
--- a/libstdc++-v3/testsuite/lib/libstdc++.exp
+++ b/libstdc++-v3/testsuite/lib/libstdc++.exp
@@ -1219,14 +1219,16 @@ proc check_v3_target_atomic_builtins { } {
set src atomic_builtins[pid].cc
set f [open $src "w"]
- puts $f "#include <bits/c++config.h>"
- puts $f "#ifndef _GLIBCXX_ATOMIC_BUILTINS_4"
- puts $f "# error No atomic builtins"
+ puts $f "#if __GCC_ATOMIC_BOOL_LOCK_FREE < 2"
+ puts $f "# error No atomic bool"
+ puts $f "#endif"
+ puts $f "#if __GCC_ATOMIC_INT_LOCK_FREE < 2"
+ puts $f "# error No atomic int"
puts $f "#endif"
close $f
set cxxflags_saved $cxxflags
- set cxxflags "$cxxflags $DEFAULT_CXXFLAGS -Werror"
+ set cxxflags "$cxxflags $DEFAULT_CXXFLAGS -Werror -std=gnu++0x"
set lines [v3_target_compile $src /dev/null preprocess ""]
set cxxflags $cxxflags_saved