diff options
author | Olivier Hainque <hainque@act-europe.fr> | 2003-03-04 21:14:59 +0100 |
---|---|---|
committer | Geert Bosch <bosch@gcc.gnu.org> | 2003-03-04 21:14:59 +0100 |
commit | 23cae84fbb26f73019cd5330ce960a3661d430ac (patch) | |
tree | 468e170ab74680bf828abe7663ade351abdcebfe /gcc/ada/raise.c | |
parent | db720d9a74f699c6eac1ae6802d5866c0f55ece1 (diff) | |
download | gcc-23cae84fbb26f73019cd5330ce960a3661d430ac.zip gcc-23cae84fbb26f73019cd5330ce960a3661d430ac.tar.gz gcc-23cae84fbb26f73019cd5330ce960a3661d430ac.tar.bz2 |
a-except.adb (Unwind_RaiseException): Import a GNAT specific wrapper...
ada/9911
* a-except.adb (Unwind_RaiseException): Import a GNAT specific
wrapper, which name remains constant whatever underlying GCC
scheme.
* raise.c (__gnat_Unwind_RaiseException): New wrappers, providing
the stable interface needed for a-except.
From-SVN: r63795
Diffstat (limited to 'gcc/ada/raise.c')
-rw-r--r-- | gcc/ada/raise.c | 37 |
1 files changed, 32 insertions, 5 deletions
diff --git a/gcc/ada/raise.c b/gcc/ada/raise.c index 087448a..4db4d20 100644 --- a/gcc/ada/raise.c +++ b/gcc/ada/raise.c @@ -597,21 +597,48 @@ __gnat_eh_personality (version, actions, exception_class, ue_header, context) } -#else /* IN_RTS - For eh personality routine */ +/* If the underlying GCC scheme for exception handling is SJLJ, the standard + propagation routine (_Unwind_RaiseException) is actually renamed using a + #define directive (see unwing-sjlj.c). We need a consistently named + interface to import from a-except, so stubs are defined here. */ + +#ifdef __USING_SJLJ_EXCEPTIONS__ + +_Unwind_Reason_Code +__gnat_Unwind_RaiseException (e) + struct _Unwind_Exception *e; +{ + return _Unwind_SjLj_RaiseException (e); +} + +#else +/* __USING_SJLJ_EXCEPTIONS__ not defined */ + +void +__gnat_Unwind_RaiseException (e) + struct _Unwind_Exception *e; +{ + return _Unwind_RaiseException (e); +} + +#endif + +#else +/* IN_RTS not defined */ /* The calls to the GCC runtime interface for exception raising are currently issued from a-except.adb, which is used by both the runtime library and the compiler. As the compiler binary is not linked against the GCC runtime library, we need a stub for this interface in the compiler case. */ +/* Since we don't link the compiler with a host libgcc, we should not be + using the GCC eh mechanism for the compiler and so expect this function + never to be called. */ _Unwind_Reason_Code -_Unwind_RaiseException (e) +__gnat_Unwind_RaiseException (e) struct _Unwind_Exception *e ATTRIBUTE_UNUSED; { - /* Since we don't link the compiler with a host libgcc, we should not be - using the GCC eh mechanism for the compiler and so expect this function - never to be called. */ abort (); } |