@@ -678,11 +678,11 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
678
678
#endif
679
679
680
680
#if USE_COMPUTED_GOTOS
681
- #define TARGET (op ) TARGET_##op: INSTRUCTION_START(op);
682
- #define DISPATCH_GOTO () goto *opcode_targets[opcode]
681
+ # define TARGET (op ) TARGET_##op: INSTRUCTION_START(op);
682
+ # define DISPATCH_GOTO () goto *opcode_targets[opcode]
683
683
#else
684
- #define TARGET (op ) case op: INSTRUCTION_START(op);
685
- #define DISPATCH_GOTO () goto dispatch_opcode
684
+ # define TARGET (op ) case op: TARGET_## op: INSTRUCTION_START(op);
685
+ # define DISPATCH_GOTO () goto dispatch_opcode
686
686
#endif
687
687
688
688
/* PRE_DISPATCH_GOTO() does lltrace if enabled. Normally a no-op */
@@ -1056,6 +1056,18 @@ static inline void _Py_LeaveRecursiveCallPy(PyThreadState *tstate) {
1056
1056
#define KWNAMES_LEN () \
1057
1057
(kwnames == NULL ? 0 : ((int)PyTuple_GET_SIZE(kwnames)))
1058
1058
1059
+ /* Disable unused label warnings. They are handy for debugging, even
1060
+ if computed gotos aren't used. */
1061
+
1062
+ /* TBD - what about other compilers? */
1063
+ #if defined(__GNUC__ )
1064
+ # pragma GCC diagnostic push
1065
+ # pragma GCC diagnostic ignored "-Wunused-label"
1066
+ #elif defined(_MSC_VER ) /* MS_WINDOWS */
1067
+ # pragma warning(push)
1068
+ # pragma warning(disable:4102)
1069
+ #endif
1070
+
1059
1071
PyObject * _Py_HOT_FUNCTION
1060
1072
_PyEval_EvalFrameDefault (PyThreadState * tstate , _PyInterpreterFrame * frame , int throwflag )
1061
1073
{
@@ -1435,6 +1447,11 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
1435
1447
goto error ;
1436
1448
1437
1449
}
1450
+ #if defined(__GNUC__ )
1451
+ # pragma GCC diagnostic pop
1452
+ #elif defined(_MSC_VER ) /* MS_WINDOWS */
1453
+ # pragma warning(pop)
1454
+ #endif
1438
1455
1439
1456
static void
1440
1457
format_missing (PyThreadState * tstate , const char * kind ,
0 commit comments