summaryrefslogtreecommitdiff
path: root/vm_eval.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-16 08:04:38 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-16 08:04:38 +0000
commit3ea0a5bd3e572571769bef17b1d64db2ff2f86e4 (patch)
treee3b66641f6f313628812f04e45bcad086aabee92 /vm_eval.c
parent564f77cad8950873cb284e221e7872dce13e24ec (diff)
vm_eval.c: suppress warning
* vm_eval.c (eval_string_with_cref): move cref inside EXEC_TAG block to suppress a warning that 'cref' might be clobbered by 'longjmp', on gcc 4.7 or later. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_eval.c')
-rw-r--r--vm_eval.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/vm_eval.c b/vm_eval.c
index efd22a4371..49b49fe103 100644
--- a/vm_eval.c
+++ b/vm_eval.c
@@ -1176,7 +1176,7 @@ rb_each(VALUE obj)
}
static VALUE
-eval_string_with_cref(VALUE self, VALUE src, VALUE scope, NODE *cref, volatile VALUE file, volatile int line)
+eval_string_with_cref(VALUE self, VALUE src, VALUE scope, NODE *const cref_arg, volatile VALUE file, volatile int line)
{
int state;
VALUE result = Qundef;
@@ -1198,6 +1198,7 @@ eval_string_with_cref(VALUE self, VALUE src, VALUE scope, NODE *cref, volatile V
mild_compile_error = th->mild_compile_error;
TH_PUSH_TAG(th);
if ((state = TH_EXEC_TAG()) == 0) {
+ NODE *cref = cref_arg;
rb_binding_t *bind = 0;
rb_iseq_t *iseq;
volatile VALUE iseqval;