From 408f78e22ea52ed4a55560174d1dfac9ce83b2c6 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 20 Feb 2026 13:34:58 -0800 Subject: [PATCH] Fix build with pre-C23 compilers other than GCC, Clang, or MSVC We forgot to define `unreachable()` for them. Found when trying to compile Qt for INTEGRITY: ``` "/home/qt/work/qt/qtbase/src/corelib/../3rdparty/tinycbor/src/cborparser.c", line 246: error #20: identifier "unreachable" is undefined cbor_assert(false); /* these conditions can't be reached */ ^ ``` Signed-off-by: Thiago Macieira --- src/compilersupport_p.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compilersupport_p.h b/src/compilersupport_p.h index 7f247730..7114e4df 100644 --- a/src/compilersupport_p.h +++ b/src/compilersupport_p.h @@ -225,6 +225,8 @@ # define unreachable() __builtin_unreachable() #elif defined(_MSC_VER) # define unreachable() __assume(0) +#else +# define unreachable() #endif static inline bool add_check_overflow(size_t v1, size_t v2, size_t *r)