[前][次][番号順一覧][スレッド一覧]

ruby-changes:30503

From: nobu <ko1@a...>
Date: Fri, 16 Aug 2013 17:04:47 +0900 (JST)
Subject: [ruby-changes:30503] nobu:r42582 (trunk): vm_eval.c: suppress warning

nobu	2013-08-16 17:04:38 +0900 (Fri, 16 Aug 2013)

  New Revision: 42582

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42582

  Log:
    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.

  Modified files:
    trunk/vm_eval.c
Index: vm_eval.c
===================================================================
--- vm_eval.c	(revision 42581)
+++ vm_eval.c	(revision 42582)
@@ -1176,7 +1176,7 @@ rb_each(VALUE obj) https://github.com/ruby/ruby/blob/trunk/vm_eval.c#L1176
 }
 
 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 https://github.com/ruby/ruby/blob/trunk/vm_eval.c#L1198
     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;

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]