From a8c6e993d9146233cf380be16c0790f5c5d4b715 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sat, 23 Sep 2017 10:37:35 -0700 Subject: [PATCH] compiler: Fix test for "optimize" attribute. This was introduced with GCC 4.4. This fixes build warnings compiling with Clang, which pretends to be GCC 4.3 and does not support the "optimize" attribute. --- src/libpspp/compiler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libpspp/compiler.h b/src/libpspp/compiler.h index 07b36b8e24..b5d02466dc 100644 --- a/src/libpspp/compiler.h +++ b/src/libpspp/compiler.h @@ -91,7 +91,7 @@ /* This attribute indicates that the function should be compiled with the specified LEVEL, regardless of what has been specified on the command line */ -#if __GNUC__ > 3 +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR >= 4) #define OPTIMIZE(LEVEL) ATTRIBUTE ((optimize(LEVEL))) #else #define OPTIMIZE(LEVEL) -- 2.30.2