lkml.org 
[lkml]   [2008]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 06/15] m68k: Make gcc aware that BUG() does not return
From: Geert Uytterhoeven <geert@linux-m68k.org>

Use `__builtin_trap()' instead of `asm volatile("illegal")' in the m68k BUG()
macros (as suggested by Andrew Pinski), to kill warnings in code that assumes
BUG() does not return.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
include/asm-m68k/bug.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--- a/include/asm-m68k/bug.h
+++ b/include/asm-m68k/bug.h
@@ -7,7 +7,7 @@
#ifndef CONFIG_SUN3
#define BUG() do { \
printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
- asm volatile("illegal"); \
+ __builtin_trap(); \
} while (0)
#else
#define BUG() do { \
@@ -17,7 +17,7 @@
#endif
#else
#define BUG() do { \
- asm volatile("illegal"); \
+ __builtin_trap(); \
} while (0)
#endif

--
Gr{oetje,eeting}s,
Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds



\
 
 \ /
  Last update: 2008-04-24 20:43    [W:0.147 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site