]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[PATCH] Make BUILD_BUG_ON fail at compile time.
authorAndi Kleen <ak@suse.de>
Tue, 13 Sep 2005 08:25:13 +0000 (01:25 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 13 Sep 2005 15:22:28 +0000 (08:22 -0700)
commit921717a2a1cde78c9b2aa971c16510d63efe7320
tree500ce20507a4c75e1e179492b7d70f2135e1ca94
parent0f3d2bd54f8fb178f516fc6903366e16e20f7428
[PATCH] Make BUILD_BUG_ON fail at compile time.

Force a compiler error instead of a link error, because they are easier to
track down.  Idea stolen from code by Jan Beulich <jbeulich@novell.com>

If the argument to BUILD_BUG_ON evaluates to non-zero the compiler will do:

t.c:6: error: size of array `type name' is negative

(surprised that gcc doesn't have an extension for this)

Signed-off-by: "Andi Kleen" <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/linux/kernel.h