sketchbook
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
bug.h File Reference

Go to the source code of this file.

Macros

#define __linktime_error(message)   __attribute__((__error__(message)))
 
#define BUILD_BUG_ON(condition)   ((void)sizeof(char[1 - 2*!!(condition)]))
 
#define BUILD_BUG()
 
#define BUG(s)   do {} while(1)
 

Macro Definition Documentation

#define __linktime_error (   message)    __attribute__((__error__(message)))
#define BUG (   s)    do {} while(1)
#define BUILD_BUG ( )
Value:
do { \
__build_bug_failed(); \
} while (0)

BUILD_BUG - break compile if used.

If you have some code that you expect the compiler to eliminate at build time, you should use BUILD_BUG to detect if it is unexpectedly used.

#define BUILD_BUG_ON (   condition)    ((void)sizeof(char[1 - 2*!!(condition)]))