Luna/libs/libc/src/assert.cpp

12 lines
303 B
C++
Raw Normal View History

2022-10-15 08:05:48 +00:00
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
extern "C"
{
__lc_noreturn bool __assertion_failed(const char* file, int line, const char* function, const char* expr)
{
fprintf(stderr, "%s:%d: %s: Assertion '%s' failed.", file, line, function, expr);
abort();
}
}