Emitting errors In a project, you can fail in several ways: Fail at build time (compilation error) Fail at init time (early run-time) Fail at run-time Misbehave with no hard failure A build failure is to be preferred, whenever possible You save a lot of time if you error out early How to fail at build time Complain with #warning/#error (on condition) Overflow ram/stack at build time (on mishap) Refer to an undefined symbol (on condition) Create an array of negative size (on condition) #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))