]> gcc.gnu.org Git - gcc.git/commitdiff
exception_support.cc (__terminate_func): Remove declaration.
authorChris Demetriou <cgd@broadcom.com>
Wed, 24 Jan 2001 03:04:36 +0000 (03:04 +0000)
committerChris Demetriou <cgd@gcc.gnu.org>
Wed, 24 Jan 2001 03:04:36 +0000 (19:04 -0800)
2001-01-23  Chris Demetriou  <cgd@broadcom.com>

        * libsupc++/exception_support.cc (__terminate_func): Remove
        declaration.
        (__terminate_func_ptr): New typedef.
        (__terminate, __terminate_set_func): New extern function
        prototypes.
        (std::terminate): Use __terminate function.
        (std::set_terminate): Use __terminate_set_func function.

From-SVN: r39226

libstdc++-v3/ChangeLog
libstdc++-v3/libsupc++/exception_support.cc

index 13439b037cc2f73b644bb5325c01668a694e9694..e962f278e017088bfb715d1cdc172467a23a074f 100644 (file)
@@ -1,3 +1,13 @@
+2001-01-23  Chris Demetriou  <cgd@broadcom.com>
+
+       * libsupc++/exception_support.cc (__terminate_func): Remove
+       declaration.
+       (__terminate_func_ptr): New typedef.
+       (__terminate, __terminate_set_func): New extern function
+       prototypes.
+       (std::terminate): Use __terminate function.
+       (std::set_terminate): Use __terminate_set_func function.
+
 2001-01-23  Benjamin Kosnik  <bkoz@redhat.com>
 
        * configure.target: Just use os_include_dir always.
index f6ec508687664fd0087332d4782000bdb8fe85a2..3f82a1a3d92b6855e2e730fb9ddfc5b7ff718eca 100644 (file)
 /* Define terminate, unexpected, set_terminate, set_unexpected as
    well as the default terminate func and default unexpected func.  */
 
-extern std::terminate_handler __terminate_func __attribute__((__noreturn__));
+/* __terminate and __terminate_set_func, defined in libgcc2. */
+typedef void (*__terminate_func_ptr)(void) __attribute__ ((__noreturn__));
+extern "C" void __terminate (void) __attribute__ ((__noreturn__));
+extern "C" __terminate_func_ptr __terminate_set_func (__terminate_func_ptr);
+
 using std::terminate;
 
 void
 std::terminate ()
 {
-  __terminate_func ();
+  __terminate ();
 }
 
 void
@@ -60,10 +64,7 @@ static std::unexpected_handler __unexpected_func __attribute__((__noreturn__))
 std::terminate_handler
 std::set_terminate (std::terminate_handler func) throw()
 {
-  std::terminate_handler old = __terminate_func;
-
-  __terminate_func = func;
-  return old;
+  return __terminate_set_func (func);
 }
 
 std::unexpected_handler
This page took 0.0715980000000001 seconds and 5 git commands to generate.