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 /cont.c | |
parent | 7018acc946882f21d519af7c42ccf84b22a46b27 (diff) |
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 'cont.c')
-rw-r--r-- | cont.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -628,9 +628,9 @@ show_vm_pcs(const rb_control_frame_t *cfp, } } #endif +COMPILER_WARNING_PUSH #ifdef __clang__ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wduplicate-decl-specifier" +COMPILER_WARNING_IGNORED(-Wduplicate-decl-specifier) #endif static VALUE cont_capture(volatile int *volatile stat) @@ -694,9 +694,7 @@ cont_capture(volatile int *volatile stat) return contval; } } -#ifdef __clang__ -#pragma clang diagnostic pop -#endif +COMPILER_WARNING_POP static inline void fiber_restore_thread(rb_thread_t *th, rb_fiber_t *fib) |