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)
|
_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.
|
fprintf(stderr, "%s:%d: %s: Assertion '%s' failed.\n", file, line, function, expr);
|
||||||
printf("%s:%d: %s: Assertion '%s' failed.\n", file, line, function, expr);
|
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
|
|
||||||
_weak [[noreturn]] bool __check_failed(SourceLocation location, const char* expr)
|
_weak [[noreturn]] bool __check_failed(SourceLocation location, const char* expr)
|
||||||
{
|
{
|
||||||
// FIXME: Output to standard error instead of standard output.
|
fprintf(stderr, "Check failed at %s:%d in %s: %s\n", location.file(), location.line(), location.function(), expr);
|
||||||
printf("Check failed at %s:%d in %s: %s\n", location.file(), location.line(), location.function(), expr);
|
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user