summaryrefslogtreecommitdiff
path: root/libstdc++-v3/libsupc++/exception_ptr.h
diff options
context:
space:
mode:
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2014-12-12 15:10:08 +0000
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2014-12-12 15:10:08 +0000
commit146d81545912f621237df1947d60f2cd8ca0993c (patch)
tree7495594fbd2fed9ddef1699b6279da6a6968dbd0 /libstdc++-v3/libsupc++/exception_ptr.h
parentabf97bddf78320e5b7b5609756ce83d00337086e (diff)
PR libstdc++/64241
* libsupc++/exception_ptr.h: Return empty object when exceptions are disabled. * testsuite/18_support/exception_ptr/64241.cc: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218675 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/libsupc++/exception_ptr.h')
-rw-r--r--libstdc++-v3/libsupc++/exception_ptr.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/libstdc++-v3/libsupc++/exception_ptr.h b/libstdc++-v3/libsupc++/exception_ptr.h
index 9ba0de4e3909..8b27359357fa 100644
--- a/libstdc++-v3/libsupc++/exception_ptr.h
+++ b/libstdc++-v3/libsupc++/exception_ptr.h
@@ -168,16 +168,18 @@ namespace std
exception_ptr
make_exception_ptr(_Ex __ex) _GLIBCXX_USE_NOEXCEPT
{
- __try
- {
#ifdef __EXCEPTIONS
+ try
+ {
throw __ex;
-#endif
}
- __catch(...)
+ catch(...)
{
return current_exception();
}
+#else
+ return exception_ptr();
+#endif
}
// _GLIBCXX_RESOLVE_LIB_DEFECTS