diff --git a/man3/assert.3 b/man3/assert.3 index af3509004..8833d29ce 100644 --- a/man3/assert.3 +++ b/man3/assert.3 @@ -38,14 +38,21 @@ assert \- abort the program if assertion is false This macro can help programmers find bugs in their programs, or handle exceptional cases via a crash that will produce limited debugging output. -The function will print an error message to standard error -(e.g., "assertion failed in file foo.c, function do_bar(), line 1287") -and terminate the program by calling -.BR abort (3) -if + +If .I expression -is false (i.e., compares equal to zero). -.LP +is false (i.e., compares equal to zero), +.BR assert () +prints an error message to standard error +and terminates the program by calling +.BR abort (3). +The error message includes the name of the file and function containing the +.BR assert () +call, the source code line number of the call, and the text of the argument; +something like: + + prog: some_file.c:16: some_func: Assertion `val == 0' failed. + If the macro .B NDEBUG is defined at the moment