From: Willy Tarreau Date: Mon, 13 Sep 2021 07:30:09 +0000 (+0200) Subject: BUILD: compiler: fixed a missing test on defined(__GNUC__) X-Git-Tag: v2.5-dev8~200 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ac6597cbed48d8d727eb59427713099f815ccbb;p=thirdparty%2Fhaproxy.git BUILD: compiler: fixed a missing test on defined(__GNUC__) This one could theoretically trigger -Wundef on non-gcc compatible compilers if DEBUG_USE_ABORT is not set. --- diff --git a/include/haproxy/compiler.h b/include/haproxy/compiler.h index 1f0c40db91..352da8ec2c 100644 --- a/include/haproxy/compiler.h +++ b/include/haproxy/compiler.h @@ -102,7 +102,7 @@ #ifdef DEBUG_USE_ABORT #define my_unreachable() abort() #else -#if __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) +#if defined(__GNUC__) && (__GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)) #define my_unreachable() __builtin_unreachable() #else #define my_unreachable()