summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3c7b327)
raw | patch | inline | side by side (parent: 3c7b327)
author | Max Kellermann <max.kellermann@gmail.com> | |
Fri, 10 Mar 2017 20:39:42 +0000 (21:39 +0100) | ||
committer | Max Kellermann <max.kellermann@gmail.com> | |
Fri, 10 Mar 2017 20:39:42 +0000 (21:39 +0100) |
src/Compiler.h | patch | blob | history |
diff --git a/src/Compiler.h b/src/Compiler.h
index d76c8f6b968a2269ad9c5f5ccda846cb573fd853..38c008f4bbe66e515d5366788b4493073cc6a382 100644 (file)
--- a/src/Compiler.h
+++ b/src/Compiler.h
# define CLANG_VERSION 0
#endif
+/**
+ * Are we building with the specified version of gcc (not clang or any
+ * other compiler) or newer?
+ */
#define GCC_CHECK_VERSION(major, minor) \
- (GCC_VERSION >= GCC_MAKE_VERSION(major, minor, 0))
+ (!CLANG_VERSION && \
+ GCC_VERSION >= GCC_MAKE_VERSION(major, minor, 0))
/**
* Are we building with clang (any version) or at least the specified
#endif /* ! GCC_UNUSED >= 40300 */
-#if GCC_CHECK_VERSION(4,6) && !defined(__clang__)
+#if GCC_CHECK_VERSION(4,6)
#define gcc_flatten __attribute__((flatten))
#else
#define gcc_flatten