diff options
author | Jason Merrill <jason@redhat.com> | 2014-01-27 08:57:39 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2014-01-27 08:57:39 -0500 |
commit | ccc2e73ce793f729f0bd717b67f51ca197fc03b9 (patch) | |
tree | b9ced4b2c6e40c433f2b5f497b836f4ca15b47ad /gcc | |
parent | c6f6157a454184cff8711fb968e090c09ca93297 (diff) | |
download | gcc-ccc2e73ce793f729f0bd717b67f51ca197fc03b9.zip gcc-ccc2e73ce793f729f0bd717b67f51ca197fc03b9.tar.gz gcc-ccc2e73ce793f729f0bd717b67f51ca197fc03b9.tar.bz2 |
Core DR 475 PR c++/41174 PR c++/59224
Core DR 475
PR c++/41174
PR c++/59224
* libsupc++/eh_throw.cc (__cxa_throw): Set uncaughtExceptions.
* libsupc++/eh_alloc.cc (__cxa_allocate_dependent_exception)
(__cxa_allocate_exception): Don't set it here.
From-SVN: r207129
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/g++.dg/eh/uncaught1.C | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/eh/uncaught4.C | 29 |
2 files changed, 30 insertions, 1 deletions
diff --git a/gcc/testsuite/g++.dg/eh/uncaught1.C b/gcc/testsuite/g++.dg/eh/uncaught1.C index afbf5af4..e96af33 100644 --- a/gcc/testsuite/g++.dg/eh/uncaught1.C +++ b/gcc/testsuite/g++.dg/eh/uncaught1.C @@ -13,7 +13,7 @@ struct Check { static Check const data[] = { { 0, 0, false }, // construct [0] - { 1, 0, true }, // [1] = [0] + { 1, 0, false }, // [1] = [0] { 0, 0, true }, // destruct [0] { 2, 1, true }, // [2] = [1] { 2, 2, true }, // destruct [2] diff --git a/gcc/testsuite/g++.dg/eh/uncaught4.C b/gcc/testsuite/g++.dg/eh/uncaught4.C new file mode 100644 index 0000000..227d11b --- /dev/null +++ b/gcc/testsuite/g++.dg/eh/uncaught4.C @@ -0,0 +1,29 @@ +// PR c++/41174 +// { dg-do run } + +#include <exception> + +#define assert(E) if (!(E)) __builtin_abort(); + +struct e { + e() + { + assert( !std::uncaught_exception() ); + try { + throw 1; + } catch (int i) { + assert( !std::uncaught_exception() ); + throw; + } + } +}; + +int main() +{ + try { + throw e(); + } catch (int i) { + assert( !std::uncaught_exception() ); + } + assert( !std::uncaught_exception() ); +} |