delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2011/07/12/13:50:37

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
X-Recipient: djgpp-workers AT delorie DOT com
X-Authenticated: #27081556
X-Provags-ID: V01U2FsdGVkX19/Hyc2Nhl/Z9O+svM08aPcHK4TGIeRlHVVw4MdO5
fhC1ZgHo1lQytv
From: Juan Manuel Guerrero <juan DOT guerrero AT gmx DOT de>
To: djgpp-workers AT delorie DOT com
Subject: Re: longjmp not marked with noreturn attribute
Date: Tue, 12 Jul 2011 19:45:08 +0200
User-Agent: KMail/1.9.10
References: <CAA2C=vCzxuxuMdBfJO3mdoc2OQpKw5cJ_ywLm6bwazFz5uVGQA AT mail DOT gmail DOT com> <201107102211 DOT 05970 DOT juan DOT guerrero AT gmx DOT de> <CAA2C=vD9p4oNdV+d8KZqt5yT+8uwZ0_beONQD7UCxfb3iM3nzA AT mail DOT gmail DOT com>
In-Reply-To: <CAA2C=vD9p4oNdV+d8KZqt5yT+8uwZ0_beONQD7UCxfb3iM3nzA@mail.gmail.com>
MIME-Version: 1.0
Message-Id: <201107121945.08515.juan.guerrero@gmx.de>
X-Y-GMX-Trusted: 0
Reply-To: djgpp-workers AT delorie DOT com

Am Montag, 11. Juli 2011 schrieb Ozkan Sezer:
> On Sun, Jul 10, 2011 at 11:11 PM, Juan Manuel Guerrero
> <juan DOT guerrero AT gmx DOT de> wrote:
> > Am Sonntag, 10. Juli 2011 schrieb Ozkan Sezer:
> >> The setjmp.h from djgpp does not mark longjmp() as noreturn,
> >> therefore, g++ warns upon seeing a function who is calling longjmp()
> >> and marked as noreturn:
> > [snip]
> >
> > I commited the patch.
> >
> > Regards,
> > Juan M. Guerrero
> >
> 
> Thanks.
> 
> However, I seem to missed touching siglongjmp in the same way:
> it needs the same noreturn attribute, too.
> 
> --
> O.S.
> 

Commited the following patch.

Regards,
Juan M. Guerrero



Index: djgpp/include/setjmp.h
===================================================================
RCS file: /cvs/djgpp/djgpp/include/setjmp.h,v
retrieving revision 1.7
diff -U 5 -r1.7 setjmp.h
--- djgpp/include/setjmp.h	10 Jul 2011 20:13:23 -0000	1.7
+++ djgpp/include/setjmp.h	12 Jul 2011 17:46:24 -0000
@@ -34,11 +34,11 @@
 #ifndef __STRICT_ANSI__
 
 typedef jmp_buf sigjmp_buf;
 
 int	sigsetjmp(sigjmp_buf env, int savemask);
-int	siglongjmp(sigjmp_buf env, int val);
+int	siglongjmp(sigjmp_buf env, int val) __attribute__((__noreturn__));
 
 #ifndef _POSIX_SOURCE
 
 #endif /* !_POSIX_SOURCE */
 #endif /* !__STRICT_ANSI__ */

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019