Conditionally remove unreachable for C23+

This commit is contained in:
appujee 2024-11-06 13:14:10 -08:00 committed by Qi Wang
parent d8486b2653
commit 4b88bddbca
1 changed files with 9 additions and 0 deletions

View File

@ -39,6 +39,15 @@
# define unlikely(x) !!(x)
#endif
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
#include <stddef.h>
#else
#if !defined(JEMALLOC_INTERNAL_UNREACHABLE)
# error JEMALLOC_INTERNAL_UNREACHABLE should have been defined by configure
#endif
#define unreachable() JEMALLOC_INTERNAL_UNREACHABLE()
#endif
/* Set error code. */
UTIL_INLINE void
set_errno(int errnum) {