]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-94021: Address unreachable code warning in specialize code (GH-94022)
authorChristian Heimes <christian@python.org>
Tue, 21 Jun 2022 06:34:11 +0000 (08:34 +0200)
committerGitHub <noreply@github.com>
Tue, 21 Jun 2022 06:34:11 +0000 (23:34 -0700)
Misc/NEWS.d/next/Core and Builtins/2022-06-20-13-48-57.gh-issue-94021.o78q3G.rst [new file with mode: 0644]
Python/specialize.c

diff --git a/Misc/NEWS.d/next/Core and Builtins/2022-06-20-13-48-57.gh-issue-94021.o78q3G.rst b/Misc/NEWS.d/next/Core and Builtins/2022-06-20-13-48-57.gh-issue-94021.o78q3G.rst
new file mode 100644 (file)
index 0000000..0724c51
--- /dev/null
@@ -0,0 +1 @@
+Fix unreachable code warning in ``Python/specialize.c``.
index 70ccf68a1175917344590705c5fec6eff34c1165..3922b1eec79277811b5f3136d8b560b476e49ab6 100644 (file)
@@ -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];