diff options
author | Lioncash <mathew1800@gmail.com> | 2020-08-24 04:06:18 -0400 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2020-08-24 04:15:10 -0400 |
commit | 3bfaabdbdd9e7e74f09c209ad239c5087f702ec0 (patch) | |
tree | 5209f50b858bd6a504f4fe2c827c803c2a7d1218 | |
parent | b72d2069babe9e7ec103e4bc1357cc474982a6df (diff) |
common/assert: Make use of C++ attribute syntax
Normalizes the syntax used for attributes
-rw-r--r-- | src/common/assert.h | 7 |
1 files 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 <typename Fn> #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 |