assert: Use attribute specifier syntax with non MSVC compilers (#12)
This commit is contained in:
parent
cc3e7e71aa
commit
3e03524658
1 changed files with 2 additions and 2 deletions
|
@ -18,11 +18,11 @@ template <typename Fn>
|
|||
#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_) \
|
||||
|
|
Loading…
Reference in a new issue