Luna/libc/src/assert.cpp

15 lines
402 B
C++
Raw Normal View History

2023-01-22 11:51:30 +00:00
#include <assert.h>
#include <luna/Attributes.h>
#include <stdio.h>
#include <stdlib.h>
extern "C"
{
_weak [[noreturn]] void __assertion_failed(const char* file, int line, const char* function, const char* expr)
{
// FIXME: Output to standard error instead of standard output.
printf("%s:%d: %s: Assertion '%s' failed.\n", file, line, function, expr);
abort();
}
}