]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: compiler: fixed a missing test on defined(__GNUC__)
authorWilly Tarreau <w@1wt.eu>
Mon, 13 Sep 2021 07:30:09 +0000 (09:30 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 13 Sep 2021 07:30:47 +0000 (09:30 +0200)
This one could theoretically trigger -Wundef on non-gcc compatible
compilers if DEBUG_USE_ABORT is not set.

include/haproxy/compiler.h

index 1f0c40db91f70bc5d5fb958dd8a2ee0824be904e..352da8ec2c3281940c78ad8d91a5c366455b0d75 100644 (file)
 #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()