diff options
author | Paolo Carlini <pcarlini@suse.de> | 2004-12-30 00:21:10 +0000 |
---|---|---|
committer | Paolo Carlini <pcarlini@suse.de> | 2004-12-30 00:21:10 +0000 |
commit | f6b545b49fc5e9c47c4fc29fc6e20575affc7565 (patch) | |
tree | 53fbaf5bf7be5d0613a639ddf4b5d53dbddcadd2 /libstdc++-v3 | |
parent | d5e93b935b2fff92df020f7505f2b2138efb7aa4 (diff) |
2004-12-29 Paolo Carlini <pcarlini@suse.de>
Minimal fixes for -fno-exceptions.
* src/bitmap_allocator.cc (free_list::_M_get): Use
__throw_exception_again, instead of plain throw.
* testsuite/testsuite_abi.cc (get_symbol, examine_symbol,
create_symbols): Likewise.
* testsuite/testsuite_hooks.cc (verify_demangle,
run_tests_wrapped_locale, run_tests_wrapped_env): Likewise.
(try_named_locale): Wrap the whole catch in __EXCEPTIONS.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@92720 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 11 | ||||
-rw-r--r-- | libstdc++-v3/src/bitmap_allocator.cc | 2 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/testsuite_abi.cc | 6 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/testsuite_hooks.cc | 10 |
4 files changed, 22 insertions, 7 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index c6705aa0c8a..4f9c8d08779 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,16 @@ 2004-12-29 Paolo Carlini <pcarlini@suse.de> + Minimal fixes for -fno-exceptions. + * src/bitmap_allocator.cc (free_list::_M_get): Use + __throw_exception_again, instead of plain throw. + * testsuite/testsuite_abi.cc (get_symbol, examine_symbol, + create_symbols): Likewise. + * testsuite/testsuite_hooks.cc (verify_demangle, + run_tests_wrapped_locale, run_tests_wrapped_env): Likewise. + (try_named_locale): Wrap the whole catch in __EXCEPTIONS. + +2004-12-29 Paolo Carlini <pcarlini@suse.de> + * include/tr1/type_traits: Add has_nothrow_constructor. * testsuite/tr1/4_metaprogramming/type_properties/ has_nothrow_constructor/has_nothrow_constructor.cc: New. diff --git a/libstdc++-v3/src/bitmap_allocator.cc b/libstdc++-v3/src/bitmap_allocator.cc index b953ffdd876..6e774a2c408 100644 --- a/libstdc++-v3/src/bitmap_allocator.cc +++ b/libstdc++-v3/src/bitmap_allocator.cc @@ -96,7 +96,7 @@ namespace __gnu_cxx *__ret = __sz; return __ret + 1; } - throw std::bad_alloc(); + __throw_exception_again std::bad_alloc(); } else { diff --git a/libstdc++-v3/testsuite/testsuite_abi.cc b/libstdc++-v3/testsuite/testsuite_abi.cc index c350c81528e..5957b78f9e9 100644 --- a/libstdc++-v3/testsuite/testsuite_abi.cc +++ b/libstdc++-v3/testsuite/testsuite_abi.cc @@ -263,7 +263,7 @@ get_symbol(const string& mangled, const symbols& s) { ostringstream os; os << "get_symbol failed for symbol " << mangled; - throw symbol_error(os.str()); + __throw_exception_again symbol_error(os.str()); } } @@ -277,7 +277,7 @@ examine_symbol(const char* name, const char* file) sym.print(); } catch(...) - { throw; } + { __throw_exception_again; } } void @@ -420,7 +420,7 @@ create_symbols(const char* file) { ostringstream os; os << "create_symbols failed for file " << file; - throw runtime_error(os.str()); + __throw_exception_again runtime_error(os.str()); } return s; } diff --git a/libstdc++-v3/testsuite/testsuite_hooks.cc b/libstdc++-v3/testsuite/testsuite_hooks.cc index e12a9b41f59..f503979b65d 100644 --- a/libstdc++-v3/testsuite/testsuite_hooks.cc +++ b/libstdc++-v3/testsuite/testsuite_hooks.cc @@ -137,7 +137,7 @@ namespace __gnu_test std::string w(wanted); if (w != s) - throw std::runtime_error(s); + __throw_exception_again std::runtime_error(std::string(s)); } @@ -184,7 +184,8 @@ namespace __gnu_test VERIFY( preLC_ALL == postLC_ALL ); } else - throw environment_variable(string("LC_ALL for ") + string(name)); + __throw_exception_again + environment_variable(string("LC_ALL for ") + string(name)); } void @@ -209,7 +210,8 @@ namespace __gnu_test setenv(env, oldENV ? oldENV : "", 1); } else - throw environment_variable(string(env) + string(" to ") + string(name)); + __throw_exception_again + environment_variable(string(env) + string(" to ") + string(name)); #endif } @@ -220,6 +222,7 @@ namespace __gnu_test { return std::locale(name); } +#ifdef __EXCEPTIONS catch (std::runtime_error& ex) { // Thrown by generic and gnu implemenation if named locale fails. @@ -228,6 +231,7 @@ namespace __gnu_test else throw; } +#endif } int |