Subversion Repositories Kolibri OS

Rev

Rev 6936 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6936 Rev 7143
Line 18... Line 18...
18
#define BUILD_BUG_ON_NULL(e) ((void*)0)
18
#define BUILD_BUG_ON_NULL(e) ((void*)0)
19
#define BUILD_BUG_ON_INVALID(e) (0)
19
#define BUILD_BUG_ON_INVALID(e) (0)
20
#define BUILD_BUG_ON_MSG(cond, msg) (0)
20
#define BUILD_BUG_ON_MSG(cond, msg) (0)
21
#define BUILD_BUG_ON(condition) (0)
21
#define BUILD_BUG_ON(condition) (0)
22
#define BUILD_BUG() (0)
22
#define BUILD_BUG() (0)
-
 
23
#define MAYBE_BUILD_BUG_ON(cond) (0)
23
#else /* __CHECKER__ */
24
#else /* __CHECKER__ */
Line 24... Line 25...
24
 
25
 
25
/* Force a compilation error if a constant expression is not a power of 2 */
26
/* Force a compilation error if a constant expression is not a power of 2 */
26
#define BUILD_BUG_ON_NOT_POWER_OF_2(n)			\
27
#define BUILD_BUG_ON_NOT_POWER_OF_2(n)			\
Line 81... Line 82...
81
 * build time, you should use BUILD_BUG to detect if it is
82
 * build time, you should use BUILD_BUG to detect if it is
82
 * unexpectedly used.
83
 * unexpectedly used.
83
 */
84
 */
84
#define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed")
85
#define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed")
Line -... Line 86...
-
 
86
 
-
 
87
#define MAYBE_BUILD_BUG_ON(cond)			\
-
 
88
	do {						\
-
 
89
		if (__builtin_constant_p((cond)))       \
-
 
90
			BUILD_BUG_ON(cond);             \
-
 
91
		else                                    \
-
 
92
			BUG_ON(cond);                   \
-
 
93
	} while (0)
85
 
94
 
Line 86... Line 95...
86
#endif	/* __CHECKER__ */
95
#endif	/* __CHECKER__ */
87
 
96