Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 921717a2 authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds
Browse files

[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: default avatar"Andi Kleen" <ak@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 0f3d2bd5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment