ddk: v4.6.7
git-svn-id: svn://kolibrios.org@7143 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -20,6 +20,7 @@ struct pt_regs;
|
||||
#define BUILD_BUG_ON_MSG(cond, msg) (0)
|
||||
#define BUILD_BUG_ON(condition) (0)
|
||||
#define BUILD_BUG() (0)
|
||||
#define MAYBE_BUILD_BUG_ON(cond) (0)
|
||||
#else /* __CHECKER__ */
|
||||
|
||||
/* Force a compilation error if a constant expression is not a power of 2 */
|
||||
@@ -83,6 +84,14 @@ struct pt_regs;
|
||||
*/
|
||||
#define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed")
|
||||
|
||||
#define MAYBE_BUILD_BUG_ON(cond) \
|
||||
do { \
|
||||
if (__builtin_constant_p((cond))) \
|
||||
BUILD_BUG_ON(cond); \
|
||||
else \
|
||||
BUG_ON(cond); \
|
||||
} while (0)
|
||||
|
||||
#endif /* __CHECKER__ */
|
||||
|
||||
#ifdef CONFIG_GENERIC_BUG
|
||||
|
Reference in New Issue
Block a user