summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a90450b)
raw | patch | inline | side by side (parent: a90450b)
author | Max Kellermann <max.kellermann@gmail.com> | |
Fri, 10 Mar 2017 20:36:23 +0000 (21:36 +0100) | ||
committer | Max Kellermann <max.kellermann@gmail.com> | |
Fri, 10 Mar 2017 20:36:23 +0000 (21:36 +0100) |
src/Compiler.h | patch | blob | history |
diff --git a/src/Compiler.h b/src/Compiler.h
index a3a48118aae3d8b4578085f104c962ce8df2babd..7d19d686d704072739593e97acc2362b2cdf1266 100644 (file)
--- a/src/Compiler.h
+++ b/src/Compiler.h
# define CLANG_VERSION 0
#endif
# define CLANG_VERSION 0
#endif
+/**
+ * Are we building with gcc (not clang or any other compiler) and a
+ * version older than the specified one?
+ */
+#define GCC_OLDER_THAN(major, minor) \
+ (GCC_VERSION && !CLANG_VERSION && \
+ GCC_VERSION < GCC_MAKE_VERSION(major, minor, 0))
+
#if GCC_CHECK_VERSION(4,0)
/* GCC 4.x */
#if GCC_CHECK_VERSION(4,0)
/* GCC 4.x */
#if defined(__cplusplus)
/* support for C++11 "override" was added in gcc 4.7 */
#if defined(__cplusplus)
/* support for C++11 "override" was added in gcc 4.7 */
-#if !defined(__clang__) && !GCC_CHECK_VERSION(4,7)
+#if GCC_OLDER_THAN(4,7)
#define override
#define final
#endif
#define override
#define final
#endif