The macro is BUILD_BUG_ONintended to implement compile-time statements.
Given an argument that can be evaluated at compile time, it causes compilation to fail if the argument is non-zero (true) and does nothing if the argument is non-zero (false).
It does not work for an argument that evaluates at runtime.
#define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))
!! - ""; 0 0, - 1.
1 (true), 1 - 2*!!(condition) -1. 0 (false), 1.
( ) . ; , . , , .
, ; , . , , .
, . C (C99 ) (VLA). VLA , VLA . undefined - , , . ( , VLA .)
, , , , . , .
: . ( , assert().) , undefined; , "" , .