Skip to content

Commit 2733c64

Browse files
gh-94021: Address unreachable code warning in specialize code (GH-94022)
(cherry picked from commit 77c839c) Co-authored-by: Christian Heimes <christian@python.org>
1 parent b8fe3bd commit 2733c64

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix unreachable code warning in ``Python/specialize.c``.

Python/specialize.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -1905,13 +1905,14 @@ _Py_Specialize_CompareOp(PyObject *lhs, PyObject *rhs, _Py_CODEUNIT *instr,
19051905
#ifndef Py_STATS
19061906
_Py_SET_OPCODE(*instr, COMPARE_OP);
19071907
return;
1908-
#endif
1908+
#else
19091909
if (next_opcode == EXTENDED_ARG) {
19101910
SPECIALIZATION_FAIL(COMPARE_OP, SPEC_FAIL_COMPARE_OP_EXTENDED_ARG);
19111911
goto failure;
19121912
}
19131913
SPECIALIZATION_FAIL(COMPARE_OP, SPEC_FAIL_COMPARE_OP_NOT_FOLLOWED_BY_COND_JUMP);
19141914
goto failure;
1915+
#endif
19151916
}
19161917
assert(oparg <= Py_GE);
19171918
int when_to_jump_mask = compare_masks[oparg];

0 commit comments

Comments
 (0)