libc: Print failed assertions to stderr instead of stdout
All checks were successful
continuous-integration/drone/push Build is passing

This removes two FIXMEs from the time there was no stderr.
This commit is contained in:
apio 2023-05-04 16:37:13 +02:00
parent 44e4ca804a
commit 58eb2d7703
Signed by: apio
GPG Key ID: B8A7D06E42258954
2 changed files with 2 additions and 4 deletions

View File

@ -7,8 +7,7 @@ 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);
fprintf(stderr, "%s:%d: %s: Assertion '%s' failed.\n", file, line, function, expr);
abort();
}
}

View File

@ -6,7 +6,6 @@
_weak [[noreturn]] bool __check_failed(SourceLocation location, const char* expr)
{
// FIXME: Output to standard error instead of standard output.
printf("Check failed at %s:%d in %s: %s\n", location.file(), location.line(), location.function(), expr);
fprintf(stderr, "Check failed at %s:%d in %s: %s\n", location.file(), location.line(), location.function(), expr);
abort();
}