From 3bfaabdbdd9e7e74f09c209ad239c5087f702ec0 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 24 Aug 2020 04:06:18 -0400 Subject: [PATCH] common/assert: Make use of C++ attribute syntax Normalizes the syntax used for attributes --- 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 5b67c5c527..06d7b5612b 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