[Ada] PATCH: fix for ada/9911
Geert Bosch
bosch@darwin.gnat.com
Tue Mar 4 20:15:00 GMT 2003
I installed the patch below on the mainline and 3.3 branch,
which fixes ada/9911.
-Geert
2003-03-04 Olivier Hainque <hainque@act-europe.fr>
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.
Index: a-except.adb
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/a-except.adb,v
retrieving revision 1.6
diff -c -r1.6 a-except.adb
*** a-except.adb 23 Oct 2002 07:33:20 -0000 1.6
--- a-except.adb 4 Mar 2003 20:00:22 -0000
***************
*** 199,205 ****
function Unwind_RaiseException
(E : access GNAT_GCC_Exception)
return Unwind_Reason_Code;
! pragma Import (C, Unwind_RaiseException, "_Unwind_RaiseException");
-----------------------
-- Local Subprograms --
--- 199,205 ----
function Unwind_RaiseException
(E : access GNAT_GCC_Exception)
return Unwind_Reason_Code;
! pragma Import (C, Unwind_RaiseException, "__gnat_Unwind_RaiseException");
-----------------------
-- Local Subprograms --
Index: raise.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/raise.c,v
retrieving revision 1.5
diff -c -r1.5 raise.c
*** raise.c 23 Oct 2002 07:33:28 -0000 1.5
--- raise.c 4 Mar 2003 20:00:22 -0000
***************
*** 597,617 ****
}
! #else /* IN_RTS - For eh personality routine */
/* 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. */
_Unwind_Reason_Code
! _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 ();
}
--- 597,644 ----
}
! /* 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
! __gnat_Unwind_RaiseException (e)
struct _Unwind_Exception *e ATTRIBUTE_UNUSED;
{
abort ();
}
More information about the Gcc-patches
mailing list