Skip to content

Commit

Permalink
pythongh-94021: Address unreachable code warning in specialize code
Browse files Browse the repository at this point in the history
  • Loading branch information
tiran committed Jun 20, 2022
1 parent 774ef28 commit 392918b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix unreachable code warning in ``Python/specialize.c``.
3 changes: 2 additions & 1 deletion Python/specialize.c
Original file line number Diff line number Diff line change
Expand Up @@ -1911,13 +1911,14 @@ _Py_Specialize_CompareOp(PyObject *lhs, PyObject *rhs, _Py_CODEUNIT *instr,
#ifndef Py_STATS
_Py_SET_OPCODE(*instr, COMPARE_OP);
return;
#endif
#else
if (next_opcode == EXTENDED_ARG) {
SPECIALIZATION_FAIL(COMPARE_OP, SPEC_FAIL_COMPARE_OP_EXTENDED_ARG);
goto failure;
}
SPECIALIZATION_FAIL(COMPARE_OP, SPEC_FAIL_COMPARE_OP_NOT_FOLLOWED_BY_COND_JUMP);
goto failure;
#endif
}
assert(oparg <= Py_GE);
int when_to_jump_mask = compare_masks[oparg];
Expand Down

0 comments on commit 392918b

Please sign in to comment.