On Tue, Aug 14, 2012 at 10:33:00AM +0200, Mark Kettenis wrote:
> > Date: Tue, 14 Aug 2012 04:12:47 -0400
> > From: Brad Smith <b...@comstyle.com>
> > 
> > ../../../../dev/x86emu/x86emu.c:291:1: error: function declared 'noreturn' 
> > should not return [-Werror,-Winvalid-noreturn]
> > 
> > 
> > x86emu_halt_sys: add an (unreached) panic after longjmp
> > 
> > To convince clang that we won't return.
> 
> Perhaps <sys/systm.h> should mark longjmp(9) as __dead?

Ok. Then how about this?


Index: sys/sys/systm.h
===================================================================
RCS file: /home/cvs/src/sys/sys/systm.h,v
retrieving revision 1.92
diff -u -p -r1.92 systm.h
--- sys/sys/systm.h     7 Aug 2012 05:16:53 -0000       1.92
+++ sys/sys/systm.h     18 Aug 2012 09:33:42 -0000
@@ -307,7 +307,7 @@ int uiomove(void *, int, struct uio *);
 
 #if defined(_KERNEL)
 int    setjmp(label_t *);
-void   longjmp(label_t *);
+__dead void    longjmp(label_t *);
 #endif
 
 void   consinit(void);

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Reply via email to