diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-07-30 07:07:48 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-07-30 07:07:48 +0000 |
commit | d83536c980fb96a880def3e952eb4920815eeb51 (patch) | |
tree | ac970bbba01d5b04b4d0ab7c0175e996d7468875 /eval_intern.h | |
parent | 7018acc946882f21d519af7c42ccf84b22a46b27 (diff) | |
download | bundler-d83536c980fb96a880def3e952eb4920815eeb51.tar.gz |
reduce copy & paste
We see several occurrence of "diagnostic push/pop" so why not
make them macros. Tested on GCC8 / Clang 6.
Note that ruby.h is intentionally left untouched because we don't
want to introduce new public macros.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval_intern.h')
-rw-r--r-- | eval_intern.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/eval_intern.h b/eval_intern.h index 5352be44f6..f4a48d8171 100644 --- a/eval_intern.h +++ b/eval_intern.h @@ -160,10 +160,10 @@ LONG WINAPI rb_w32_stack_overflow_handler(struct _EXCEPTION_POINTERS *); #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\""); \ + COMPILER_WARNING_PUSH; \ + COMPILER_WARNING_IGNORED(-Waddress-of-packed-member); \ typeof(expr) unaligned_member_access_result = (expr); \ - _Pragma("GCC diagnostic pop"); \ + COMPILER_WARNING_POP; \ unaligned_member_access_result; \ }) #else |