C99, Section 7.2.1.1, defines {{ Wiki Markup assert()
}} to have the following behavior \ [[ISO/IEC 9899:1999|AA. Bibliography#ISO/IEC 9899-1999]\]:
The
assert
macro puts diagnostic tests into programs; it expands to a void expression. When it is executed, ifexpression
(which shall have a scalar type) is false (that is, compares equal to 0), theassert
macro writes information about the particular call that failed (including the text of the argument, the name of the source file, the source line number, and the name of the enclosing functionâ”the latter are respectively the values of the pre-processing macros_FILE_
and_LINE_
and of the identifier_func_)
on the standard error stream in an implementation-defined format. It then calls theabort
function.
...