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

ruby-changes:51176

From: nobu <ko1@a...>
Date: Thu, 10 May 2018 02:17:31 +0900 (JST)
Subject: [ruby-changes:51176] nobu:r63383 (trunk): compile.c: suppress a warning

nobu	2018-05-10 02:17:06 +0900 (Thu, 10 May 2018)

  New Revision: 63383

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63383

  Log:
    compile.c: suppress a warning
    
    * compile.c (iseq_peephole_optimize): initialize dniobj first, to
      suppress a false warning by gcc 8.1.0.

  Modified files:
    trunk/compile.c
Index: compile.c
===================================================================
--- compile.c	(revision 63382)
+++ compile.c	(revision 63383)
@@ -2675,7 +2675,8 @@ iseq_peephole_optimize(rb_iseq_t *iseq, https://github.com/ruby/ruby/blob/trunk/compile.c#L2675
 	    remove_unreachable_chunk(iseq, iobj->link.next);
 	    goto again;
 	}
-	else if (IS_INSN_ID(diobj, leave) ? !(dniobj = 0) :
+	else if (dniobj = 0,
+		 IS_INSN_ID(diobj, leave) ||
 		 (diobj->operand_size == 0 &&
 		  (dniobj = (INSN *)get_next_insn(diobj)) != 0 &&
 		  (IS_INSN_ID(dniobj, leave) || (dniobj = 0)))) {

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

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