mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-14 20:03:29 +00:00
LibJS: Mark test262's __assert_fail as extern "C"
and use
...`__attribute__((__noreturn__))` This is more inline with the definition in glibc's version of the file, and stops clang from complaining about it originally not being declared as `[[no_return]]`.
This commit is contained in:
parent
5bd34f115e
commit
e68a35611b
|
@ -550,7 +550,7 @@ void __assertion_failed(char const* assertion)
|
|||
handle_failed_assert(assertion);
|
||||
}
|
||||
#else
|
||||
[[noreturn]] void __assert_fail(char const* assertion, char const* file, unsigned int line, char const* function)
|
||||
extern "C" __attribute__((__noreturn__)) void __assert_fail(char const* assertion, char const* file, unsigned int line, char const* function)
|
||||
{
|
||||
auto full_message = String::formatted("{}:{}: {}: Assertion `{}' failed.", file, line, function, assertion);
|
||||
handle_failed_assert(full_message.characters());
|
||||
|
|
Loading…
Reference in a new issue