This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch libstdc++]: Fix PR target/55445 Always defined __SEH__ when build from trunk
- From: Kai Tietz <ktietz70 at googlemail dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: "libstdc++" <libstdc++ at gcc dot gnu dot org>
- Date: Sun, 25 Nov 2012 16:41:54 +0100
- Subject: [patch libstdc++]: Fix PR target/55445 Always defined __SEH__ when build from trunk
Hi,
this patch fixes used exception-mechanism for SEH-enabled targets,
which are requesting for SjLj-exception-mechanism.
See also patch for libgcc.
ChangeLog
2012-11-25 Kai Tietz
PR target/55445
* libsupc++/eh_personaltity.cc (__SEH__): Additional check
for not being SjLj.
Tested for multilib i686-w64-mingw32, and x86_64-w64-mingw32 targets.
Ok for apply?
Regards,
Kai
Index: eh_personality.cc
===================================================================
--- eh_personality.cc (Revision 193669)
+++ eh_personality.cc (Arbeitskopie)
@@ -332,13 +332,13 @@
#ifdef _GLIBCXX_SJLJ_EXCEPTIONS
#define PERSONALITY_FUNCTION __gxx_personality_sj0
#define __builtin_eh_return_data_regno(x) x
-#elif defined(__SEH__)
+#elif defined(__SEH__) && !defined (_GLIBCXX_SJLJ_EXCEPTIONS)
#define PERSONALITY_FUNCTION __gxx_personality_imp
#else
#define PERSONALITY_FUNCTION __gxx_personality_v0
#endif
-#ifdef __SEH__
+#if defined (__SEH__) && !defined (_GLIBCXX_SJLJ_EXCEPTIONS)
static
#else
extern "C"
@@ -785,7 +785,7 @@
}
#endif
-#ifdef __SEH__
+#if defined (__SEH__) && !defined (_GLIBCXX_SJLJ_EXCEPTIONS)
extern "C"
EXCEPTION_DISPOSITION
__gxx_personality_seh0 (PEXCEPTION_RECORD ms_exc, void *this_frame,