diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-07-30 14:59:40 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-07-30 14:59:40 +0000 |
commit | 84d83482c8ba1b8e7002ed8ff4c6a2c00fa4ce62 (patch) | |
tree | c41143b7b7088d2f9ab03ea9613d658c59004e39 | |
parent | 2b582b7ca689277e63e901272b1112d19b8a914d (diff) | |
download | ruby-84d83482c8ba1b8e7002ed8ff4c6a2c00fa4ce62.tar.gz |
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
-rw-r--r-- | eval_intern.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/eval_intern.h b/eval_intern.h index 610546153f..2209504aa7 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\""); \ |