&gt; I can see how the type changing to a smaller one might cause problems, but I don&#x27;t see how IshKebab&#x27;s example could happen without exploiting implementation specific overflow behavior.<p>INT_MAX (or INT_LEASTN_MAX for annathebannana&#x27;s suggestion) doesn&#x27;t require exploiting overflow behaviour, but going from 2^15 iterations to 2^31 or 2^61 iterations may be problematic.