aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorOri Avtalion2016-07-23 14:04:56 +0300
committerOri Avtalion2016-07-23 16:18:51 +0300
commit4d120800fa63433e2fc2d76d69178431d53ba29e (patch)
tree4b7053a1d0d33be624e845149c90d127071e3bb1 /common
parent2e4dd165e936dd0cce01df505993cbe49bb335d4 (diff)
downloadscummvm-rg350-4d120800fa63433e2fc2d76d69178431d53ba29e.tar.gz
scummvm-rg350-4d120800fa63433e2fc2d76d69178431d53ba29e.tar.bz2
scummvm-rg350-4d120800fa63433e2fc2d76d69178431d53ba29e.zip
ALL: Don't use 'defined' in macro definitions
This is undefined behavior and clang warns about it. See <http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160118/147239.html>.
Diffstat (limited to 'common')
-rw-r--r--common/scummsys.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/common/scummsys.h b/common/scummsys.h
index 3513ee2d7d..eb5ff24a42 100644
--- a/common/scummsys.h
+++ b/common/scummsys.h
@@ -29,7 +29,11 @@
// This is a convenience macro to test whether the compiler used is a GCC
// version, which is at least major.minor.
-#define GCC_ATLEAST(major, minor) (defined(__GNUC__) && (__GNUC__ > (major) || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor))))
+#ifdef __GNUC__
+ #define GCC_ATLEAST(major, minor) (__GNUC__ > (major) || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor)))
+#else
+ #define GCC_ATLEAST(major, minor) 0
+#endif
#if defined(_WIN32_WCE) && _WIN32_WCE < 300
#define NONSTANDARD_PORT