diff --git a/kernel/src/Log.cpp b/kernel/src/Log.cpp index e4079699..5d242ac6 100644 --- a/kernel/src/Log.cpp +++ b/kernel/src/Log.cpp @@ -118,7 +118,7 @@ bool log_text_console_enabled() static bool g_check_already_failed = false; -_noreturn bool __check_failed(const char* file, const char* line, const char* func, const char* expr) +[[noreturn]] bool __check_failed(const char* file, const char* line, const char* func, const char* expr) { if (!g_check_already_failed) { // Avoid endlessly failing when trying to report a failed check. diff --git a/luna/include/luna/Attributes.h b/luna/include/luna/Attributes.h index f137161d..2f8edf7e 100644 --- a/luna/include/luna/Attributes.h +++ b/luna/include/luna/Attributes.h @@ -2,5 +2,4 @@ #define _weak __attribute__((weak)) #define _format(n, m) __attribute__((format(printf, n, m))) -#define _align(x) __attribute__((aligned(x))) -#define _noreturn __attribute__((noreturn)) \ No newline at end of file +#define _align(x) __attribute__((aligned(x))) \ No newline at end of file diff --git a/luna/include/luna/Check.h b/luna/include/luna/Check.h index fe1c7f50..37c3b13f 100644 --- a/luna/include/luna/Check.h +++ b/luna/include/luna/Check.h @@ -1,7 +1,7 @@ #pragma once #include -extern _noreturn bool __check_failed(const char* file, const char* line, const char* func, const char* expr); +[[noreturn]] extern bool __check_failed(const char* file, const char* line, const char* func, const char* expr); #ifndef STRINGIZE_VALUE_OF #define STRINGIZE(x) #x diff --git a/luna/src/Check.cpp b/luna/src/Check.cpp index 4f522f79..f01fef8d 100644 --- a/luna/src/Check.cpp +++ b/luna/src/Check.cpp @@ -1,6 +1,6 @@ #include -_weak _noreturn bool __check_failed(const char*, const char*, const char*, const char*) +_weak [[noreturn]] bool __check_failed(const char*, const char*, const char*, const char*) { __builtin_trap(); } \ No newline at end of file