aboutsummaryrefslogtreecommitdiffstats
path: root/include/ruby/defines.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-01-15 13:15:39 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-01-15 13:15:39 +0000
commitfd7b490fc3dc33c22b7c173617363953fc8453c8 (patch)
tree4bc6cd40781e9aad931824d00af2e8f6d2f086df /include/ruby/defines.h
parent04c55c0783340a7737c3b8d3467cb9965c758ca2 (diff)
downloadruby-fd7b490fc3dc33c22b7c173617363953fc8453c8.tar.gz
disable unaligned word access
* include/ruby/defines.h, st.c: disable unaligned word access with gcc 6 or later. [Bug #11831] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby/defines.h')
-rw-r--r--include/ruby/defines.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/ruby/defines.h b/include/ruby/defines.h
index b4d75294d4..3235b8b875 100644
--- a/include/ruby/defines.h
+++ b/include/ruby/defines.h
@@ -260,6 +260,10 @@ void rb_ia64_flushrs(void);
RUBY_ALIAS_FUNCTION_TYPE(VALUE, prot, name, args)
#endif
+#if !defined(UNALIGNED_WORD_ACCESS) && defined(__GNUC__) && __GNUC__ >= 6
+# define UNALIGNED_WORD_ACCESS 0
+#endif
+
#ifndef UNALIGNED_WORD_ACCESS
# if defined(__i386) || defined(__i386__) || defined(_M_IX86) || \
defined(__x86_64) || defined(__x86_64__) || defined(_M_AMD64) || \