PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
|
Provides assert interface used for internal error detection. More...
#include <compiler.h>
Go to the source code of this file.
Macros | |
#define | assert(cond) ((cond) ? 0 : (__eprintf(#cond,(long)(__LINE__), __FILE__), abort(), 0)) |
Abort the program if the assertion is false. More... | |
Functions | |
_NORETURN void | abort (void) |
void | __eprintf (const char *expr, unsigned long line, const char *filename) |
Provides assert interface used for internal error detection.
Definition in file assert.h.
#define assert | ( | cond | ) | ((cond) ? 0 : (__eprintf(#cond,(long)(__LINE__), __FILE__), abort(), 0)) |
Abort the program if the assertion is false.
If macro NDEBUG is defined at the moment <assert.h> was last included the assert() macro genenrates no code and does nothing.
Else assert() prints an error message to stderr and kills the program by calling abort() if cond is false.
cond | The condition tested |