Martin v. Löwis added the comment: > With Neal, I don't see what the warning in _csv is about. What condition > is being turned into a constant? Is the compiler perhaps rearranging the > code so as to insert "if (field[0] == '\0') goto XXX;" in front of the > for-loop where XXX jumps into the middle of the condition in the > if-statement immediately following the for-loop, and skipping that > if-block when breaking of the loop later?
Indeed that's what happens. In the case of breaking the loop later, the compiler can skip the if-block only if signed ints never overflow, hence the warning. Another way of silencing the warning is to test field[0]=='\0' in the if-statement. This might also somewhat pessimize the code, but allows the compiler to eliminate i altogether. __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1621> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com