keyword _Static_assert with an identical usage, and in <assert.h> a convenience macro static_assert is added. It is possible to simulate a static assertion in older versions of C using a macro: , though the resulting error is cryptic. (It triggers an error because C allows zero-length arrays, but not negative-length ones.) Gnulib's version of the static assert uses sizeof and a structure to trigger a similar error. Example #include <stdio.h> #include <assert.h> int main() { int i; for (i=0; i<=9; i++) { assert(i < 5); printf("i = %d\n", i); } return 0; } i = 0 i = 1 i = 2 i = 3 i = 4 assert: example.c:10: main: Assertion `i < 5' failed. Aborted External links References C standard library headers