ruby-changes:49425
From: shyouhei <ko1@a...>
Date: Tue, 2 Jan 2018 15:41:43 +0900 (JST)
Subject: [ruby-changes:49425] shyouhei:r61541 (trunk): suppress warning for clang
shyouhei 2018-01-02 15:41:39 +0900 (Tue, 02 Jan 2018) New Revision: 61541 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61541 Log: suppress warning for clang In this function, "volatile" is specified twice in macro-expanded `VAR_INITIALIZED(cont)` part. That is a problem in fact. However I don't want to touch this line because it is already a messy workaround for clang SEGV. Let me just ignore. Modified files: trunk/cont.c Index: cont.c =================================================================== --- cont.c (revision 61540) +++ cont.c (revision 61541) @@ -590,6 +590,10 @@ show_vm_pcs(const rb_control_frame_t *cf https://github.com/ruby/ruby/blob/trunk/cont.c#L590 } } #endif +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wduplicate-decl-specifier" +#endif static VALUE cont_capture(volatile int *volatile stat) { @@ -652,6 +656,9 @@ cont_capture(volatile int *volatile stat https://github.com/ruby/ruby/blob/trunk/cont.c#L656 return contval; } } +#ifdef __clang__ +#pragma clang diagnostic pop +#endif static inline void fiber_restore_thread(rb_thread_t *th, rb_fiber_t *fib) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/