Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
bsd_compat.h: fix __builtin_unreachable() detection with GCC
rilysh committed 1 year ago
commit 78ec0407e7244c14afdaee494af2e014ab0e994c
parent e6993fe
1 file changed +3 -7
modified compat/bsd_compat.h
@@ -176,14 +176,10 @@ char * strnstr(const char *s, const char *find, size_t slen);
#endif

#ifndef __unreachable
-
# if defined(__GNUC__) && ((__GNUC__ >= 4) && (__GNUC_MINOR__ >= 6))
-
#  define __unreachable() __builtin_unreachable()
-
# elif defined(__clang__)
-
#  if __has_builtin(__builtin_unreachable)
-
#   define __unreachable() __builtin_unreachable()
-
#  endif
+
# if defined (__GNUC__) || defined (__clang__)
+
#  define __unreachable()    __builtin_unreachable()
# else
-
#  define __unreachable() ((void)0)
+
#  define __unreachable()    ((void)0)
# endif
#endif