aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/libsupc++
diff options
context:
space:
mode:
authorChris Demetriou <cgd@broadcom.com>2001-01-24 03:04:36 +0000
committerChris Demetriou <cgd@gcc.gnu.org>2001-01-23 19:04:36 -0800
commit17fd8a87a4d92cd98089525cbc562ed3beed7937 (patch)
tree70da71ec8af01c0840f46936eacc52b672bf9383 /libstdc++-v3/libsupc++
parent93982b798a0be88625f6d46a27714e9afbbb7f42 (diff)
downloadgcc-17fd8a87a4d92cd98089525cbc562ed3beed7937.zip
gcc-17fd8a87a4d92cd98089525cbc562ed3beed7937.tar.gz
gcc-17fd8a87a4d92cd98089525cbc562ed3beed7937.tar.bz2
exception_support.cc (__terminate_func): Remove declaration.
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
Diffstat (limited to 'libstdc++-v3/libsupc++')
-rw-r--r--libstdc++-v3/libsupc++/exception_support.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/libstdc++-v3/libsupc++/exception_support.cc b/libstdc++-v3/libsupc++/exception_support.cc
index f6ec508..3f82a1a 100644
--- a/libstdc++-v3/libsupc++/exception_support.cc
+++ b/libstdc++-v3/libsupc++/exception_support.cc
@@ -39,13 +39,17 @@
/* 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