News for hackers. Stuff that matters.
Re:A bit of background on compilers exploiting signed overflow by CJefferson on Sunday May 08, 2016 @01:15PM (#11654758)
My bigger problem in the past has been loops of the type:

    for(int i = 0; i < a-b; ++i) f(a[i]);
If a < b, then this works cleanly, with no loops occuring. However:

    for(unsigned i = 0; i < a-b; ++i) f(a[i]);
Instead casts a-b to a large unsigned integer, and horrible things happen. Of course, I could add a pre-check to my loop, but I don't really want to (and of course, I have to remember to do that).

There are no comments on this comment yet.