include/qemu/osdep: Add qemu_build_assert
authorRichard Henderson <richard.henderson@linaro.org>
Sat, 22 Oct 2022 11:34:12 +0000 (21:34 +1000)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 26 Oct 2022 01:11:28 +0000 (11:11 +1000)
commitd44e3737f937c0d0da1ad18d7b48bfc3ed885e1a
tree893db5157f61feb55820a6a13a3bc678d9713102
parent69993c4e627a4e4d4d084bef643b446c97fee0f5
include/qemu/osdep: Add qemu_build_assert

This differs from assert, in that with optimization enabled it
triggers at build-time.  It differs from QEMU_BUILD_BUG_ON,
aka _Static_assert, in that it is sensitive to control flow
and is subject to dead-code elimination.

Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
include/qemu/osdep.h