diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-01-27 13:57:39 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-01-27 13:57:39 +0000 |
commit | 54b87a557efa8705e41392f5ded9b496646fc700 (patch) | |
tree | b9ced4b2c6e40c433f2b5f497b836f4ca15b47ad /libstdc++-v3 | |
parent | 01b7a8cef708a4065fa21cb95f6243b02b57d761 (diff) | |
download | ppe42-gcc-54b87a557efa8705e41392f5ded9b496646fc700.tar.gz ppe42-gcc-54b87a557efa8705e41392f5ded9b496646fc700.zip |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207129 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 9 | ||||
-rw-r--r-- | libstdc++-v3/libsupc++/eh_alloc.cc | 12 | ||||
-rw-r--r-- | libstdc++-v3/libsupc++/eh_throw.cc | 3 |
3 files changed, 12 insertions, 12 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 02f0af9bfc8..18012cb7507 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,12 @@ +2014-01-27 Jason Merrill <jason@redhat.com> + + 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. + 2014-01-26 Jonathan Wakely <jwakely@redhat.com> * include/bits/stl_map.h: Remove anachronistic comment. diff --git a/libstdc++-v3/libsupc++/eh_alloc.cc b/libstdc++-v3/libsupc++/eh_alloc.cc index 01eed979508..752f5db5a3f 100644 --- a/libstdc++-v3/libsupc++/eh_alloc.cc +++ b/libstdc++-v3/libsupc++/eh_alloc.cc @@ -129,12 +129,6 @@ __cxxabiv1::__cxa_allocate_exception(std::size_t thrown_size) _GLIBCXX_NOTHROW std::terminate (); } - // We have an uncaught exception as soon as we allocate memory. This - // yields uncaught_exception() true during the copy-constructor that - // initializes the exception object. See Issue 475. - __cxa_eh_globals *globals = __cxa_get_globals (); - globals->uncaughtExceptions += 1; - memset (ret, 0, sizeof (__cxa_refcounted_exception)); return (void *)((char *)ret + sizeof (__cxa_refcounted_exception)); @@ -191,12 +185,6 @@ __cxxabiv1::__cxa_allocate_dependent_exception() _GLIBCXX_NOTHROW std::terminate (); } - // We have an uncaught exception as soon as we allocate memory. This - // yields uncaught_exception() true during the copy-constructor that - // initializes the exception object. See Issue 475. - __cxa_eh_globals *globals = __cxa_get_globals (); - globals->uncaughtExceptions += 1; - memset (ret, 0, sizeof (__cxa_dependent_exception)); return ret; diff --git a/libstdc++-v3/libsupc++/eh_throw.cc b/libstdc++-v3/libsupc++/eh_throw.cc index ffd28d82208..e9a34e29229 100644 --- a/libstdc++-v3/libsupc++/eh_throw.cc +++ b/libstdc++-v3/libsupc++/eh_throw.cc @@ -62,6 +62,9 @@ __cxxabiv1::__cxa_throw (void *obj, std::type_info *tinfo, { PROBE2 (throw, obj, tinfo); + __cxa_eh_globals *globals = __cxa_get_globals (); + globals->uncaughtExceptions += 1; + // Definitely a primary. __cxa_refcounted_exception *header = __get_refcounted_exception_header_from_obj (obj); |