]> granicus.if.org Git - python/commitdiff
Silence a gcc warning about putting in parentheses around && expressions mixed
authorBrett Cannon <bcannon@gmail.com>
Thu, 3 Mar 2005 07:01:48 +0000 (07:01 +0000)
committerBrett Cannon <bcannon@gmail.com>
Thu, 3 Mar 2005 07:01:48 +0000 (07:01 +0000)
with || expressions.  Also clarifies intend of 'if' conditional.

Python/compile.c

index 71e90f7e21d5eabc8b75ccc29638ed30c0faec86..16bf291708d4e9ea8f2624e6d5975a0eb6f59314 100644 (file)
@@ -778,13 +778,14 @@ optimize_code(PyObject *code, PyObject* consts, PyObject *names, PyObject *linen
                        h = i - 3 * j;
                        if (h >= 0  &&
                            j <= lastlc  &&
-                           (opcode == BUILD_TUPLE && 
-                            ISBASICBLOCK(blocks, h, 3*(j+1)) ||
-                            opcode == BUILD_LIST && 
+                           ((opcode == BUILD_TUPLE && 
+                            ISBASICBLOCK(blocks, h, 3*(j+1))) ||
+                            (opcode == BUILD_LIST && 
                             codestr[i+3]==COMPARE_OP && 
                             ISBASICBLOCK(blocks, h, 3*(j+2)) &&
-                            (GETARG(codestr,i+3)==6 || GETARG(codestr,i+3)==7)) &&
-                           tuple_of_constants(&codestr[h], j, consts)) {
+                            (GETARG(codestr,i+3)==6 ||
+                                     GETARG(codestr,i+3)==7))) &&
+                            tuple_of_constants(&codestr[h], j, consts)) {
                                assert(codestr[i] == LOAD_CONST);
                                cumlc = 1;
                                break;