assert(3) Library Functions Manual assert(3) assert - C (libc, -lc) #include void assert(bool 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 Kirill Rekhov ; GNU (GNU General Public License - GPL, 3 ) , - . - , , () () () <>. Linux 6.15 17 2025 . assert(3)