From e68a35611be8bd7787894cf0cc1c407bbac531bd Mon Sep 17 00:00:00 2001 From: Hendiadyoin1 Date: Tue, 13 Sep 2022 16:02:55 +0200 Subject: [PATCH] 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]]`. --- Tests/LibJS/test262-runner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/LibJS/test262-runner.cpp b/Tests/LibJS/test262-runner.cpp index c0cf102369..31890b743d 100644 --- a/Tests/LibJS/test262-runner.cpp +++ b/Tests/LibJS/test262-runner.cpp @@ -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());