diff --git a/headers/private/kernel/debug.h b/headers/private/kernel/debug.h index af9a38156d..927c9b33cc 100644 --- a/headers/private/kernel/debug.h +++ b/headers/private/kernel/debug.h @@ -64,9 +64,11 @@ #if KDEBUG # define ASSERT(x) ASSERT_ALWAYS(x) # define ASSERT_PRINT(x, format, args...) ASSERT_ALWAYS_PRINT(x, format, args) +# define ASSERT_UNREACHABLE() panic("ASSERT UNREACHABLE (%s:%d)", __FILE__, __LINE__) #else # define ASSERT(x) do { } while(0) # define ASSERT_PRINT(x, format, args...) do { } while(0) +# define ASSERT_UNREACHABLE() __builtin_unreachable() #endif #if __GNUC__ >= 5 && !defined(__cplusplus)