diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/bug.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/bug.h b/include/linux/bug.h index 72961c39576a..aaac4bba6f5c 100644 --- a/include/linux/bug.h +++ b/include/linux/bug.h | |||
| @@ -30,6 +30,13 @@ struct pt_regs; | |||
| 30 | #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); })) | 30 | #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); })) |
| 31 | #define BUILD_BUG_ON_NULL(e) ((void *)sizeof(struct { int:-!!(e); })) | 31 | #define BUILD_BUG_ON_NULL(e) ((void *)sizeof(struct { int:-!!(e); })) |
| 32 | 32 | ||
| 33 | /* | ||
| 34 | * BUILD_BUG_ON_INVALID() permits the compiler to check the validity of the | ||
| 35 | * expression but avoids the generation of any code, even if that expression | ||
| 36 | * has side-effects. | ||
| 37 | */ | ||
| 38 | #define BUILD_BUG_ON_INVALID(e) ((void)(sizeof((__force long)(e)))) | ||
| 39 | |||
| 33 | /** | 40 | /** |
| 34 | * BUILD_BUG_ON - break compile if a condition is true. | 41 | * BUILD_BUG_ON - break compile if a condition is true. |
| 35 | * @condition: the condition which the compiler should know is false. | 42 | * @condition: the condition which the compiler should know is false. |
