This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author loewis
Recipients alexandre.vassalotti, christian.heimes, donmez, gregory.p.smith, gvanrossum, loewis, nnorwitz
Date 2008-01-28.08:14:19
SpamBayes Score 0.044513974
Marked as misclassified No
Message-id <>
In-reply-to <>
> 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.
Date User Action Args
2008-01-28 08:14:22loewissetspambayes_score: 0.044514 -> 0.044513974
recipients: + loewis, gvanrossum, nnorwitz, gregory.p.smith, christian.heimes, alexandre.vassalotti, donmez
2008-01-28 08:14:20loewislinkissue1621 messages
2008-01-28 08:14:20loewiscreate