Minimal fixes for -fno-exceptions.
authorPaolo Carlini <pcarlini@suse.de>
Thu, 30 Dec 2004 00:21:10 +0000 (00:21 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Thu, 30 Dec 2004 00:21:10 +0000 (00:21 +0000)
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.

From-SVN: r92720

libstdc++-v3/ChangeLog
libstdc++-v3/src/bitmap_allocator.cc
libstdc++-v3/testsuite/testsuite_abi.cc
libstdc++-v3/testsuite/testsuite_hooks.cc

index c6705aa0c8a04828ac7b3798c2696faa73852db2..4f9c8d08779a26c7f735b5fdd35ee8eeb025c7c1 100644 (file)
@@ -1,3 +1,14 @@
+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.
index b953ffdd876ba6835ec1be3278101e8af63ae4cb..6e774a2c4081047887e4a2d81981474a8374274c 100644 (file)
@@ -96,7 +96,7 @@ namespace __gnu_cxx
            *__ret = __sz;
            return __ret + 1;
          }
-       throw std::bad_alloc();
+       __throw_exception_again std::bad_alloc();
       }
     else
       {
index c350c81528e1cb24f17849a119d396da74294796..5957b78f9e9cb30346535e851800152de6615840 100644 (file)
@@ -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;
 }
index e12a9b41f594c235de03d5d63b5a293a15a2a779..f503979b65d85d2ca8aec98606e654bd801d42f0 100644 (file)
@@ -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