Implement BUILD_BUG_ON_ZERO() in the LinuxKPI.
Tested using gcc and clang. MFC after: 1 week Sponsored by: Mellanox Technologies
This commit is contained in:
parent
9543f281e8
commit
c185f13b92
@ -94,6 +94,9 @@
|
||||
#define BUILD_BUG_ON_NOT_POWER_OF_2(x) BUILD_BUG_ON(!powerof2(x))
|
||||
#define BUILD_BUG_ON_INVALID(expr) while (0) { (void)(expr); }
|
||||
|
||||
extern const volatile int lkpi_build_bug_on_zero;
|
||||
#define BUILD_BUG_ON_ZERO(x) ((x) ? lkpi_build_bug_on_zero : 0)
|
||||
|
||||
#define BUG() panic("BUG at %s:%d", __FILE__, __LINE__)
|
||||
#define BUG_ON(cond) do { \
|
||||
if (cond) { \
|
||||
|
Loading…
x
Reference in New Issue
Block a user