Chapter 2. Diagnostics <assert.h>

The header <assert.h> defines the assert macro and refers to another macro.

NDEBUG

which is not defined by <assert.h>. If NDEBUG is defined as a macro name at the point in the source file where <assert.h> is included, the assert macro is defined simply as

#define assert(ignore) ((void)0)

The assert macro is implemented as a macro, not as an actual function. If the macro definition is suppressed in order to access an actual function, the behavior is undefined.

2.1. Program Diagnostics

Table of Contents
The assert macro -- The assert macro