Hi, this patch adds the missing part of PR/55445 for Ada. Issue is that __SEH__ gets defined if SEH-annotations are generated. That doesn't mean necessarily that SEH-exception-mechanism is used. The SEH-annotations are also used for SjLj-exception-mechanism. So patch adds to clauses the additional check that SjLj is deactive.
ChangeLog 2013-04-23 Kai Tietz <kti...@redhat.com> PR target/55445 * raise-gcc.c (__SEH__): Additional check that SjLj isn't active. Tested for x86_64-pc-cygwin, and x86_64-w64-mingw32. Ok for apply? Regards, Kai Index: raise-gcc.c =================================================================== --- raise-gcc.c (Revision 198124) +++ raise-gcc.c (Arbeitskopie) @@ -1019,7 +1019,7 @@ extern void __gnat_notify_unhandled_exception (str #ifdef __USING_SJLJ_EXCEPTIONS__ #define PERSONALITY_FUNCTION __gnat_personality_sj0 -#elif defined(__SEH__) +#elif defined (__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__) #define PERSONALITY_FUNCTION __gnat_personality_imp #else #define PERSONALITY_FUNCTION __gnat_personality_v0 @@ -1056,7 +1056,7 @@ typedef int version_arg_t; typedef _Unwind_Action phases_arg_t; #endif -#ifdef __SEH__ +#if defined (__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__) static #endif _Unwind_Reason_Code @@ -1222,7 +1222,7 @@ __gnat_Unwind_ForcedUnwind (_Unwind_Exception *e, #endif } -#ifdef __SEH__ +#if defined (__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__) #define STATUS_USER_DEFINED (1U << 29)