1assert.h(3HEAD) Headers assert.h(3HEAD)
2
3
4
6 assert.h, assert - verify program assertion
7
9 #include <assert.h>
10
11
13 The <assert.h> header defines the assert() macro. It refers to the
14 macro NDEBUG which is not defined in the header. If NDEBUG is defined
15 as a macro name before the inclusion of this header, the assert() macro
16 is defined simply as:
17
18 #define assert(ignore)((void) 0)
19
20
21
22 Otherwise, the macro behaves as described in assert(3C).
23
24
25 The assert() macro is redefined according to the current state of NDE‐
26 BUG each time <assert.h> is included.
27
28
29 The assert() macro is implemented as a macro, not as a function. If the
30 macro definition is suppressed in order to access an actual function,
31 the behavior is undefined.
32
34 See attributes(5) for descriptions of the following attributes:
35
36
37
38
39 ┌─────────────────────────────┬─────────────────────────────┐
40 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
41 ├─────────────────────────────┼─────────────────────────────┤
42 │Interface Stability │Standard │
43 └─────────────────────────────┴─────────────────────────────┘
44
46 assert(3C), attributes(5), standards(5)
47
48
49
50SunOS 5.11 10 Sep 2004 assert.h(3HEAD)