assert(3) Library Functions Manual assert(3) assert - LIBRARY Standard C library (libc, -lc) #include void assert(scalar expression); , . expression (. ., ), assert() abort(3). , assert(), ; : prog: some_file.c:16: some_func: Assertion `val == 0' failed. NDEBUG , assert() , , . NDEBUG, assert() , . . attributes(7). +----------------------------+----------------------------------------------------------+--------------------------+ | | | | +----------------------------+----------------------------------------------------------+--------------------------+ |assert() | | MT-Safe | +----------------------------+----------------------------------------------------------+--------------------------+ C11, POSIX.1-2008. C89, C99, POSIX.1-2001. In C89, expression is required to be of type int and undefined behavior results if it is not, but in C99 it may have any scalar type. assert() . , NDEBUG. , . . abort(3), assert_perror(3), exit(3) Dmitry Bolkhovskikh Yuri Kozlov ; GNU 3 , . . , , . Linux man-pages 6.06 31 2023 . assert(3)