From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28161 invoked by alias); 28 Nov 2012 18:01:32 -0000 Received: (qmail 28130 invoked by uid 22791); 28 Nov 2012 18:01:30 -0000 X-SWARE-Spam-Status: No, hits=-3.9 required=5.0 tests=AWL,BAYES_00,DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-wi0-f169.google.com (HELO mail-wi0-f169.google.com) (209.85.212.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 28 Nov 2012 18:01:25 +0000 Received: by mail-wi0-f169.google.com with SMTP id hq12so5138182wib.2 for ; Wed, 28 Nov 2012 10:01:24 -0800 (PST) MIME-Version: 1.0 Received: by 10.216.45.144 with SMTP id p16mr7955409web.170.1354125684543; Wed, 28 Nov 2012 10:01:24 -0800 (PST) Received: by 10.216.153.132 with HTTP; Wed, 28 Nov 2012 10:01:24 -0800 (PST) In-Reply-To: References: Date: Wed, 28 Nov 2012 18:01:00 -0000 Message-ID: Subject: Re: [patch libgcc]: Fix PR target/55445 Always defined __SEH__ when build from trunk From: Kai Tietz To: GCC Patches Cc: Richard Henderson Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2012-11/txt/msg02351.txt.bz2 Ping 2012/11/25 Kai Tietz : > Hi, > > the issue here is that the predefined macro __SEH__ does just indicate > that SEH-infrastructure is present. It doesn't mean that SEH is used > as exception-mechansim. Therefore the checks in libgcc's (and as > followup in libstdc++'s) eh exception-mechansim for SEH were not > regarding that there might SjLj enabled instead. > > ChangeLog > > 2012-11-25 Kai Tietz > > PR target/55445 > * unwind-c (__SEH__): Make sure SjLj isn't > active. > * unwind-generic.h: Likewise. > * unwind-seh.c: Likewise. > > Tested for multilib i686-w64-mingw32, and x86_64-w64-mingw32. Ok for apply? > > Regards, > Kai > > Index: unwind-c.c > =================================================================== > --- unwind-c.c (Revision 193669) > +++ unwind-c.c (Arbeitskopie) > @@ -109,7 +109,7 @@ > struct _Unwind_Exception * ue_header, > struct _Unwind_Context * context) > #else > -#ifdef __SEH__ > +#if defined (__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__) > static > #endif > _Unwind_Reason_Code > @@ -233,7 +233,7 @@ > return _URC_INSTALL_CONTEXT; > } > > -#ifdef __SEH__ > +#if defined (__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__) > EXCEPTION_DISPOSITION > __gcc_personality_seh0 (PEXCEPTION_RECORD ms_exc, void *this_frame, > PCONTEXT ms_orig_context, PDISPATCHER_CONTEXT ms_disp) > Index: unwind-generic.h > =================================================================== > --- unwind-generic.h (Revision 193669) > +++ unwind-generic.h (Arbeitskopie) > @@ -28,7 +28,7 @@ > #ifndef _UNWIND_H > #define _UNWIND_H > > -#ifdef __SEH__ > +#if defined (__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__) > /* Only for _GCC_specific_handler. */ > #include > #endif > @@ -275,7 +275,7 @@ > # error "What type shall we use for _sleb128_t?" > #endif > > -#ifdef __SEH__ > +#if defined (__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__) > /* Handles the mapping from SEH to GCC interfaces. */ > EXCEPTION_DISPOSITION _GCC_specific_handler (PEXCEPTION_RECORD, void *, > PCONTEXT, PDISPATCHER_CONTEXT, > Index: unwind-seh.c > =================================================================== > --- unwind-seh.c (Revision 193669) > +++ unwind-seh.c (Arbeitskopie) > @@ -28,7 +28,7 @@ > #include "tm.h" > #include "unwind.h" > > -#ifdef __SEH__ > +#if defined (__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__) > > /* At the moment everything is written for x64, but in theory this could > also be used for i386, arm, mips and other extant embedded Windows. */ > @@ -480,4 +480,4 @@ > return _URC_END_OF_STACK; > #endif > } > -#endif /* __SEH__ */ > +#endif /* __SEH__ && !defined (__USING_SJLJ_EXCEPTIONS__) */ -- | (\_/) This is Bunny. Copy and paste | (='.'=) Bunny into your signature to help | (")_(") him gain world domination