From def90d1dd67c044f7f6c005d42eeccfba6aeddfc Mon Sep 17 00:00:00 2001 From: jason Date: Fri, 31 Oct 1997 09:52:55 +0000 Subject: Fri Oct 31 01:45:31 1997 Jason Merrill * libgcc2.c (L_eh): Define __eh_pc. Replace __eh_type with generic pointer __eh_info. Fri Oct 31 01:47:57 1997 Jason Merrill Support for nested exceptions. * tinfo2.cc (__is_pointer): New fn. * exception.cc (struct cp_eh_info): Define. (__cp_exception_info, __uncatch_exception): New fns. (__cp_push_exception, __cp_pop_exception): New fns. * except.c: Lose saved_throw_{type,value,cleanup,in_catch}. Lose empty_fndecl. (init_exception_processing): Likewise. __eh_pc is now external. (push_eh_info): New fn. (get_eh_{info,value,type,caught}): New fns. (push_eh_cleanup): Just call __cp_pop_exception. (expand_start_catch_block): Use push_eh_info. Start the eh region sooner. (expand_end_eh_spec): Use push_eh_info. (expand_throw): Call __cp_push_exception to set up the exception info. Just pass the destructor or 0 as the cleanup. Call __uncatch_exception when we rethrow. (expand_builtin_throw): Don't refer to empty_fndecl. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@16248 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/libgcc2.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'gcc/libgcc2.c') diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c index ae97c5313ae..6c34da7acf5 100644 --- a/gcc/libgcc2.c +++ b/gcc/libgcc2.c @@ -3109,7 +3109,9 @@ int _exit_dummy_decl = 0; /* prevent compiler & linker warnings */ /* Shared exception handling support routines. */ -extern void *__eh_type; +/* Language-specific information about the active exception(s). If there + are no active exceptions, it is set to 0. */ +void *__eh_info; void __default_terminate () @@ -3224,7 +3226,7 @@ __sjthrow () /* We must call terminate if we try and rethrow an exception, when there is no exception currently active and when there are no handlers left. */ - if (! __eh_type || (*dhc) == top_elt) + if (! __eh_info || (*dhc) == top_elt) __terminate (); /* Find the jmpbuf associated with the top element of the dynamic @@ -3307,7 +3309,7 @@ __sjpopnthrow () /* This value identifies the place from which an exception is being thrown. */ -extern void *__eh_pc; +void *__eh_pc; #ifdef EH_TABLE_LOOKUP @@ -3652,7 +3654,7 @@ __throw () /* This is required for C++ semantics. We must call terminate if we try and rethrow an exception, when there is no exception currently active. */ - if (! __eh_type) + if (! __eh_info) __terminate (); /* Start at our stack frame. */ -- cgit v1.2.1