Re: [PATCH] ARM: Convert BUG() to use unreachable()

From: Paolo Bonzini
Date: Tue Dec 22 2009 - 06:33:49 EST

On 12/17/2009 06:17 PM, Richard Guenther wrote:
It shouldn't as *(int *)0 = 0; might trap. But if you want to be sure
__builtin_trap ();
instead for the whole sequence (the unreachable is implied then).
GCC choses a size-optimal trap representation for your target then.

Agree that it shouldn't but just to be sure I'd use

*(volatile int *)0 = 0;
unreachable ();

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at