summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-05-09 17:17:06 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-05-09 17:17:06 (GMT)
commit5afd479de63b6609ddcd1510da94d2c1ac384f7f (patch)
treee823414a482d0aa9e99e57204562519ae03cea80 /compile.c
parent179bc1b814a6152a8c4d0f20664741caffa156e5 (diff)
compile.c: suppress a warning
* compile.c (iseq_peephole_optimize): initialize dniobj first, to suppress a false warning by gcc 8.1.0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/compile.c b/compile.c
index 5b5d645..9ab43e3 100644
--- a/compile.c
+++ b/compile.c
@@ -2675,7 +2675,8 @@ iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcal
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)))) {