News for hackers. Stuff that matters.
Re:A bit of background on compilers exploiting signed overflow by tzs on Sunday May 08, 2016 @12:40PM (#11654646)
If n is not within k of the maximum unsigned integer:

  i = n+k;
  do {
    i -= k;
    ...
  } while (i >= k);
If n is close enough to the maximum unsigned integer for n+k to overflow:

  i = n;
  goto skip_sub;
  do {
    i -= k;
  skip_sub:
    ...
  } while (i >= k);

There are no comments on this comment yet.