From: Paolo Carlini Date: Thu, 23 Dec 2004 21:53:36 +0000 (+0000) Subject: Minimal fixes for -fno-exceptions. X-Git-Tag: releases/gcc-3.4.4~371 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f22f7e3cf33ee3c9817d309c0d3147aed4d93752;p=thirdparty%2Fgcc.git Minimal fixes for -fno-exceptions. 2004-12-23 Paolo Carlini Minimal fixes for -fno-exceptions. * testsuite/testsuite_abi.cc (get_symbol, examine_symbol, create_symbols): Use __throw_exception_again, instead of plain throw. * testsuite/testsuite_hooks.cc (verify_demangle, run_tests_wrapped_locale, run_tests_wrapped_env): Likewise. (try_named_locale): Wrap the whole catch in __EXCEPTIONS. From-SVN: r92570 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 5203cd3b4f04..c45ff17189e4 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,13 @@ +2004-12-23 Paolo Carlini + + Minimal fixes for -fno-exceptions. + * testsuite/testsuite_abi.cc (get_symbol, examine_symbol, + create_symbols): Use __throw_exception_again, instead of + plain throw. + * 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-06 Paolo Carlini PR libstdc++/18837 diff --git a/libstdc++-v3/testsuite/testsuite_abi.cc b/libstdc++-v3/testsuite/testsuite_abi.cc index 54e995099ee1..f7b6d08e1d17 100644 --- a/libstdc++-v3/testsuite/testsuite_abi.cc +++ b/libstdc++-v3/testsuite/testsuite_abi.cc @@ -262,7 +262,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()); } } @@ -276,7 +276,7 @@ examine_symbol(const char* name, const char* file) sym.print(); } catch(...) - { throw; } + { __throw_exception_again; } } void @@ -419,7 +419,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 e12a9b41f594..f503979b65d8 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