summaryrefslogtreecommitdiff
path: root/eval_intern.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-07-30 14:59:40 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-07-30 14:59:40 (GMT)
commit84d83482c8ba1b8e7002ed8ff4c6a2c00fa4ce62 (patch)
treec41143b7b7088d2f9ab03ea9613d658c59004e39 /eval_intern.h
parent2b582b7ca689277e63e901272b1112d19b8a914d (diff)
UNALIGNED_MEMBER_ACCESS only for clang
* eval_intern.h (UNALIGNED_MEMBER_ACCESS): enable only on clang. gcc does not complain about pointers to member of unaligned struct. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval_intern.h')
-rw-r--r--eval_intern.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/eval_intern.h b/eval_intern.h
index 6105461..2209504 100644
--- a/eval_intern.h
+++ b/eval_intern.h
@@ -157,7 +157,8 @@ LONG WINAPI rb_w32_stack_overflow_handler(struct _EXCEPTION_POINTERS *);
# define VAR_NOCLOBBERED(var) var
#endif
-#if defined(USE_UNALIGNED_MEMBER_ACCESS) && USE_UNALIGNED_MEMBER_ACCESS
+#if defined(USE_UNALIGNED_MEMBER_ACCESS) && USE_UNALIGNED_MEMBER_ACCESS && \
+ defined(__clang__)
# define UNALIGNED_MEMBER_ACCESS(expr) __extension__({ \
_Pragma("GCC diagnostic push"); \
_Pragma("GCC diagnostic ignored \"-Waddress-of-packed-member\""); \