From be953b4d1ce3f0dfc7f24c84ec7a51e027102557 Mon Sep 17 00:00:00 2001 From: naruse Date: Wed, 22 Jun 2011 11:00:24 +0000 Subject: * cont.c (cont_capture): add volatile. On clang -O, it is needed to avoid the optimization. With this and llvm/clang's recent fix, clang 3.0 can build ruby-trunk with -O option. * cont.c (cont_capture): use for-loop. * array.c (rb_ary_each): add volatile and use it. * vm_insnhelper.c (vm_call_cfunc): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_insnhelper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vm_insnhelper.c') diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 376c6aa15a..bd03c69395 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -386,11 +386,11 @@ call_cfunc(VALUE (*func)(), VALUE recv, } static inline VALUE -vm_call_cfunc(rb_thread_t *th, rb_control_frame_t *reg_cfp, +vm_call_cfunc(rb_thread_t *th, volatile rb_control_frame_t *reg_cfp, int num, VALUE recv, const rb_block_t *blockptr, const rb_method_entry_t *me) { - VALUE val = 0; + volatile VALUE val = 0; const rb_method_definition_t *def = me->def; rb_control_frame_t *cfp; -- cgit v1.2.3