From: Krzysztof Raszkowski Date: Fri, 30 Aug 2019 05:50:21 +0000 (+0000) Subject: util: Add unreachable() definition for clang compiler. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8be51061eca39a766f5304198dc6f42296232b22;p=mesa.git util: Add unreachable() definition for clang compiler. Without unreachable() definition clang throw return-type error in many places in mesa code. Reviewed-by: Eric Engestrom --- diff --git a/src/util/macros.h b/src/util/macros.h index f5f099bb594..55dd80c870b 100644 --- a/src/util/macros.h +++ b/src/util/macros.h @@ -72,7 +72,7 @@ * Unreachable macro. Useful for suppressing "control reaches end of non-void * function" warnings. */ -#ifdef HAVE___BUILTIN_UNREACHABLE +#if defined(HAVE___BUILTIN_UNREACHABLE) || __has_builtin(__builtin_unreachable) #define unreachable(str) \ do { \ assert(!str); \