From 28d6ba6f63c4033d5c13c737cd2d7bd7799859d0 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 7 Jun 2021 15:13:43 +0100 Subject: [Minor] Add unreachable code macro --- config.h.in | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'config.h.in') diff --git a/config.h.in b/config.h.in index c52506f8e..74f694f88 100644 --- a/config.h.in +++ b/config.h.in @@ -444,6 +444,12 @@ extern uint64_t ottery_rand_uint64(void); #define RSPAMD_CONST_FUNCTION #endif +#ifdef __GNUC__ +#define RSPAMD_UNREACHABLE __builtin_unreachable() +#else +#define RSPAMD_UNREACHABLE abort() +#endif + #define HAVE_OPENSSL 1 #define HAVE_MATH_H 1 -- cgit v1.2.3