header file ./include/linux/kernel.h 的兩個 Macro 定義:
683 /* Force a compilation error if condition is true, but also produce a
684 result (of value 0 and type size_t), so the expression can be used
685 e.g. in a structure initializer (or where-ever else comma expressions
686 aren't permitted). */
687 #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
688 #define BUILD_BUG_ON_NULL(e) ((void *)sizeof(struct { int:-!!(e); }))
689
然後也有人解釋了:-!!,就是 : 取位元數, - 負的,!! 測試 e 是否為 0 ,回傳 0 或 1
就語意上是在測試另一個在 ./include/asm-generic/bug.h BUG_ON() macro 是否回傳
0 或 null,如果是 0 或 null 就正確 (size 0),否就會 build fail (size (-1))
0 或 null,如果是 0 或 null 就正確 (size 0),否就會 build fail (size (-1))