diff options
author | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-01-18 11:24:20 +0000 |
---|---|---|
committer | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-01-18 11:24:20 +0000 |
commit | 217e808b16828033d5bcf92994209401319ac057 (patch) | |
tree | 43c441e2bc317c76d06b2a6b1e409a474711ba7b /libstdc++-v3 | |
parent | ea780bd9a3efa19223e03d48d37b490204f2da92 (diff) | |
download | gcc-217e808b16828033d5bcf92994209401319ac057.tar.gz |
Fix libstdc++ build with -fno-exceptions
PR libstdc++/69340
* src/c++11/cow-stdexcept.cc (_txnal_cow_string_C1_for_exceptions):
Use macros for exception handling and fix unused parameter warning.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232502 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 6 | ||||
-rw-r--r-- | libstdc++-v3/src/c++11/cow-stdexcept.cc | 9 |
2 files changed, 11 insertions, 4 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 48600ad7d6d..74ef4f61eab 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2016-01-18 Jonathan Wakely <jwakely@redhat.com> + + PR libstdc++/69340 + * src/c++11/cow-stdexcept.cc (_txnal_cow_string_C1_for_exceptions): + Use macros for exception handling and fix unused parameter warning. + 2016-01-17 John David Anglin <danglin@gcc.gnu.org> PR libstdc++/68734 diff --git a/libstdc++-v3/src/c++11/cow-stdexcept.cc b/libstdc++-v3/src/c++11/cow-stdexcept.cc index e2d7e761493..eddb36b48c4 100644 --- a/libstdc++-v3/src/c++11/cow-stdexcept.cc +++ b/libstdc++-v3/src/c++11/cow-stdexcept.cc @@ -232,7 +232,8 @@ void _ITM_addUserCommitAction(void (*)(void *), uint64_t, void *) { }; // that also notifies the TM runtime about allocations belonging to this // exception. void -_txnal_cow_string_C1_for_exceptions(void* that, const char* s, void *exc) +_txnal_cow_string_C1_for_exceptions(void* that, const char* s, + void *exc __attribute__((unused))) { typedef std::basic_string<char> bs_type; bs_type *bs = (bs_type*) that; @@ -249,17 +250,17 @@ _txnal_cow_string_C1_for_exceptions(void* that, const char* s, void *exc) // TODO Once this is supported, link the following allocation to this // exception: void *prev = _ITM_setAssociatedException(exc); bs_type::_Rep *rep; - try + __try { rep = (bs_type::_Rep*) _ZGTtnaX (len + sizeof (bs_type::_Rep)); } - catch (...) + __catch (...) { // Pop the association with this exception. // TODO Once this is supported, link the following allocation to this // exception: _ITM_setAssociatedException(prev); // We do not need to instrument a rethrow. - throw; + __throw_exception_again; } // Pop the association with this exception. // TODO Once this is supported, link the following allocation to this |