__assert_fail

Name

__assert_fail -- abort the program after false assertion

Synopsis

void __assert_fail(const char *assertion , const char *file , unsigned int line , const char *function );

Description

__assert_fail receives a string containing the expression assertion , the filename file , and the line number line , and prints a message on the standard error stream. For example:

a.c:10: foobar: Assertion a == b failed.

__assert_fail then aborts program execution via a call to abort. The exact form of the message is up to the implementation.

If function is NULL, then omit information about the function.

assertion , file , and line must be non-NULL.

__assert_fail is not in the source standard; it is only in the binary standard.

Retour en haut de la page
Mandragor.org - Version 8.3