define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
define must_be_array(a) BUILD_BUG_ON_ZERO(same_type((a), &(a)[0]))
define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
TFW compile-time type checking.
Найдено в сорцах прыщеядра.