aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2016-06-07 15:29:11 +0200
committerBjörn-Egil Dahlberg <[email protected]>2016-06-07 15:48:59 +0200
commit4c6ccf1c2f13d4b6ea34bc0eecc8a772cb38e80a (patch)
treed6b21829c004d971f1b60798cf1f416f5d004929
parent3a5c3a5c1b0eb756a2258aea87f3bacb89199064 (diff)
downloadotp-4c6ccf1c2f13d4b6ea34bc0eecc8a772cb38e80a.tar.gz
otp-4c6ccf1c2f13d4b6ea34bc0eecc8a772cb38e80a.tar.bz2
otp-4c6ccf1c2f13d4b6ea34bc0eecc8a772cb38e80a.zip
erts: Let clang have suppressable unused variables
-rw-r--r--erts/emulator/beam/sys.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/erts/emulator/beam/sys.h b/erts/emulator/beam/sys.h
index 9a205d50d3..dfe82cab44 100644
--- a/erts/emulator/beam/sys.h
+++ b/erts/emulator/beam/sys.h
@@ -154,8 +154,9 @@ typedef ERTS_SYS_FD_TYPE ErtsSysFdType;
# define ERTS_WRITE_UNLIKELY(X) X
#endif
+/* clang may have too low __GNUC__ versions but can handle it */
#ifdef __GNUC__
-# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 5)
+# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 5) || defined(__clang__)
# define ERTS_DECLARE_DUMMY(X) X __attribute__ ((unused))
# else
# define ERTS_DECLARE_DUMMY(X) X