News for hackers. Stuff that matters.
Re:Why I’m Using C by beefhash on Saturday March 14, 2020 @11:19AM (#22575901)
> Find me one system in current use (2020) that isn't 2's complement.

Fortunately, C2x will stop with the meme assumption that two's complement hasn't taken over the world (see draft N2479). It will not, however, specify signed integer overflow, which remains UB. :^)

Re:Why I’m Using C by loup-vaillant on Saturday March 14, 2020 @01:28PM (#22576925)
Compiler writers are too hooked on loop optimisations now to give up on undefined signed overflow. I'm afraid the only clean fix is to augment the language with an actual `for` loop, with an immutable loop index and well defined start and finish values. Stuff like:

  for (size_t i : 0..10)     {} // Will go from 0 to 9 included.
  for (size_t i : 10..0, -1) {} // Will go from 10 to 1 included...
                                // ...or maybe from 9 to 0 included?
                                // Not sure which is best.