diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 1997-10-31 09:52:55 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 1997-10-31 09:52:55 +0000 |
commit | def90d1dd67c044f7f6c005d42eeccfba6aeddfc (patch) | |
tree | 4369bf2e164b02228c2c4a5d1ae1ceb8ded7b16a /gcc/libgcc2.c | |
parent | 49d768f2eb491c5ae8183a3c97b3ab3c470b7c7f (diff) | |
download | gcc-def90d1dd67c044f7f6c005d42eeccfba6aeddfc.tar.gz |
Fri Oct 31 01:45:31 1997 Jason Merrill <jason@yorick.cygnus.com>
* libgcc2.c (L_eh): Define __eh_pc.
Replace __eh_type with generic pointer __eh_info.
Fri Oct 31 01:47:57 1997 Jason Merrill <jason@yorick.cygnus.com>
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
Diffstat (limited to 'gcc/libgcc2.c')
-rw-r--r-- | gcc/libgcc2.c | 10 |
1 files changed, 6 insertions, 4 deletions
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. */ |