use C11's _Static_assert() for BUILD_BUG_ON etc when available
authorJan Beulich <jbeulich@suse.com>
Fri, 27 Jul 2012 07:59:25 +0000 (09:59 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 27 Jul 2012 07:59:25 +0000 (09:59 +0200)
commit2621048598e9c71a44811add31d8d7530d1ed056
tree2f3f705a24b37ecc63697a7e491d8fa43fd6ff69
parent7e45ec6a46a9c2026e6148c0020a92ce29b5d12e
use C11's _Static_assert() for BUILD_BUG_ON etc when available

This produces a more meaningful compiler diagnostic in case it happens
to trigger.

As a minor piece of cleanup, at once also use BUILD_BUG_ON_ZERO() to
actually define BUILD_BUG_ON() in the legacy case, slightly reducing
redundancy.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/include/xen/lib.h