Skip to content

Commit

Permalink
m68k: Make gcc aware that BUG() does not return
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Geert Uytterhoeven authored and Linus Torvalds committed May 18, 2008
1 parent eb4db45 commit e8006b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/asm-m68k/bug.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 { \
Expand All @@ -17,7 +17,7 @@
#endif
#else
#define BUG() do { \
asm volatile("illegal"); \
__builtin_trap(); \
} while (0)
#endif

Expand Down

0 comments on commit e8006b0

Please sign in to comment.