15 lines
350 B
C
15 lines
350 B
C
#ifndef CONFORMANCE_ASSERT_H
|
|
#define CONFORMANCE_ASSERT_H
|
|
|
|
/* The freestanding conformance runtime has no libc assert; abort() publishes
|
|
* the terminal status, so a failed assertion is an honest nonzero result. */
|
|
void abort(void);
|
|
|
|
#ifdef NDEBUG
|
|
#define assert(expr) ((void)0)
|
|
#else
|
|
#define assert(expr) ((expr) ? (void)0 : abort())
|
|
#endif
|
|
|
|
#endif
|