From 66846836bc7017a0c5a34f7718b4e0dcdfe2472c Mon Sep 17 00:00:00 2001 From: Tobias Date: Wed, 2 Sep 2020 17:25:31 +0200 Subject: [PATCH] Port yuzu-emu/yuzu#4577: "common/assert: Make use of C++ attribute syntax" (#5529) Co-authored-by: Lioncash --- src/common/assert.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/common/assert.h b/src/common/assert.h index 05e1533260..c44fe8c368 100644 --- a/src/common/assert.h +++ b/src/common/assert.h @@ -17,11 +17,12 @@ // enough for our purposes. template #if defined(_MSC_VER) -__declspec(noinline, noreturn) +[[msvc::noinline, noreturn]] #elif defined(__GNUC__) - __attribute__((noinline, noreturn, cold)) +[[gnu::cold, gnu::noinline, noreturn]] #endif - static void assert_noinline_call(const Fn& fn) { +static void +assert_noinline_call(const Fn& fn) { fn(); Crash(); exit(1); // Keeps GCC's mouth shut about this actually returning