diff options
Diffstat (limited to 'include/bl_common.h')
-rw-r--r-- | include/bl_common.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/bl_common.h b/include/bl_common.h index 3504d041..0af98d68 100644 --- a/include/bl_common.h +++ b/include/bl_common.h @@ -63,6 +63,13 @@ ******************************************************************************/ #define EL_CHANGE_MEM_SIZE (sizeof(meminfo) + sizeof(el_change_info)) +/******************************************************************************* + * Macro to flag a compile time assertion. It uses the preprocessor to generate + * an invalid C construct if 'cond' evaluates to false. + * The following compilation error is triggered if the assertion fails: + * "error: size of array 'msg' is negative" + ******************************************************************************/ +#define CASSERT(cond, msg) typedef char msg[(cond) ? 0 : -1] #ifndef __ASSEMBLY__ /******************************************************************************* |