assert(3) Library Functions Manual assert(3)

NAME

assertvalidate assertion

SYNOPSIS

#include <assert.h>

void assert(<scalar expression>);

DESCRIPTION

If NDEBUG was defined when <assert.h> was last included, the macro assert results in no code being generated. Otherwise, if the expression evaluates to false, an error message is printed to stderr and execution is terminated by invoking abort().

IMPLEMENTATION NOTES

The enclosing function of the call to assert will only be printed in the error message when compiling for C99, or a later revision of the C standard.

SEE ALSO

_Exit(3) quick_exit(3) exit(3) abort(3)

STANDARDS

Conforming to ISO/IEC 9899:1990 (“ISO C90”), ISO/IEC 9899:1999 (“ISO C99”).
February 20, 2013 Fusion