From 3e0352465832a843fdc8dcb9a1e3616af0747fd0 Mon Sep 17 00:00:00 2001 From: Mat M Date: Sat, 3 Sep 2016 07:48:07 -0400 Subject: [PATCH] assert: Use attribute specifier syntax with non MSVC compilers (#12) --- src/common/assert.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/assert.h b/src/common/assert.h index 077c29e0..c9d3b2d0 100644 --- a/src/common/assert.h +++ b/src/common/assert.h @@ -18,11 +18,11 @@ template #if defined(_MSC_VER) __declspec(noinline, noreturn) #elif defined(__GNUC__) -__attribute__((noinline, noreturn, cold)) +[[noreturn, gnu::noinline, gnu::cold]] #endif static void assert_noinline_call(const Fn& fn) { fn(); - exit(1); // Keeps GCC's mouth shut about this actually returning + exit(EXIT_FAILURE); // Keeps GCC's mouth shut about this actually returning } #define ASSERT(_a_) \