summaryrefslogtreecommitdiffstats
path: root/Python/compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 15c8436..545042f 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -468,12 +468,9 @@ fold_binops_on_constants(unsigned char *codestr, PyObject *consts)
newconst = PyNumber_Multiply(v, w);
break;
case BINARY_DIVIDE:
- if (!_Py_QnewFlag) {
- newconst = PyNumber_Divide(v, w);
- break;
- }
- /* -Qnew is in effect: fall through to
- BINARY_TRUE_DIVIDE */
+ /* XXX care is needed to fold this operation statically:
+ the result might depend on the run-time presence of the -Qnew flag */
+ return 0;
case BINARY_TRUE_DIVIDE:
newconst = PyNumber_TrueDivide(v, w);
break;