Add [[noreturn]]

This commit is contained in:
Alexey Milovidov 2023-11-07 19:42:16 +01:00
parent 1432d952ac
commit a267da8f52

View File

@ -125,11 +125,7 @@
#define UNREACHABLE() abort()
// clang-format off
#else
/// Here sizeof() trick is used to suppress unused warning for result,
/// since simple "(void)x" will evaluate the expression, while
/// "sizeof(!(x))" will not.
#define NIL_EXPRESSION(x) (void)sizeof(!(x))
#define chassert(x) NIL_EXPRESSION(x)
#define chassert(x) (void)sizeof(!(x))
#define UNREACHABLE() __builtin_unreachable()
#endif
#endif