libc: Print failed assertions to stderr instead of stdout
All checks were successful
continuous-integration/drone/push Build is passing
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:
parent
44e4ca804a
commit
58eb2d7703
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user