Replace the _noreturn macro with the C++ native attribute [[noreturn]]
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
apio 2022-12-06 19:40:35 +01:00
parent c099877c35
commit 8598b1e8fc
Signed by: apio
GPG Key ID: B8A7D06E42258954
4 changed files with 4 additions and 5 deletions

View File

@ -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.

View File

@ -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))
#define _align(x) __attribute__((aligned(x)))

View File

@ -1,7 +1,7 @@
#pragma once
#include <luna/Attributes.h>
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

View File

@ -1,6 +1,6 @@
#include <luna/Attributes.h>
_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();
}