by ben-schaaf · 7y ago · 0 comments
char * i = malloc(1);
ASSERT_BUILD(i);
That just silently compiles and runs without triggering any failure. Whats worse is you can never be sure whether your assert is passing or the compiler decided not to run it. #define ASSERT_BUILD(x) extern int STATIC_ASSERT_FAILED[(x)?1:-1]