summaryrefslogtreecommitdiffstats
path: root/libstdc++
diff options
context:
space:
mode:
authorcgd <cgd@138bc75d-0d04-0410-961f-82ee72b054a4>2001-01-24 03:04:04 +0000
committercgd <cgd@138bc75d-0d04-0410-961f-82ee72b054a4>2001-01-24 03:04:04 +0000
commitf29f0958dc6a5468b6e8d2000936462eb7a577a2 (patch)
tree67e06b15334f9373215f31b281ad21e75e71f9d9 /libstdc++
parentc6deb130aea0909a9de37e228a50f5d9faa0d963 (diff)
downloadppe42-gcc-f29f0958dc6a5468b6e8d2000936462eb7a577a2.tar.gz
ppe42-gcc-f29f0958dc6a5468b6e8d2000936462eb7a577a2.zip
2001-01-23 Chris Demetriou <cgd@broadcom.com>
* exception.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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39225 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++')
-rw-r--r--libstdc++/ChangeLog9
-rw-r--r--libstdc++/exception.cc13
2 files changed, 16 insertions, 6 deletions
diff --git a/libstdc++/ChangeLog b/libstdc++/ChangeLog
index 1323c65ace5..9fc67ea02ca 100644
--- a/libstdc++/ChangeLog
+++ b/libstdc++/ChangeLog
@@ -1,3 +1,12 @@
+2001-01-23 Chris Demetriou <cgd@broadcom.com>
+
+ * exception.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.
+
2000-11-24 Magnus Fromreide <magfr@lysator.liu.se>
* sstream: Backport libstdc++-V3 sstream to V2.
diff --git a/libstdc++/exception.cc b/libstdc++/exception.cc
index 886915c823b..c27b8ff9603 100644
--- a/libstdc++/exception.cc
+++ b/libstdc++/exception.cc
@@ -38,13 +38,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
@@ -59,10 +63,7 @@ static std::unexpected_handler __unexpected_func __attribute__((__noreturn__))
std::terminate_handler
std::set_terminate (std::terminate_handler func)
{
- std::terminate_handler old = __terminate_func;
-
- __terminate_func = func;
- return old;
+ return __terminate_set_func (func);
}
std::unexpected_handler
OpenPOWER on IntegriCloud