News for hackers. Stuff that matters.
Re:GCC 6.1 Released by Kristine1975 on Wednesday April 27, 2016 @12:44PM (#11582101)
>And, maaaaaaybe signed integer overflow.

Overflow checking is sometimes done like this (where a is a signed integer):

  if (a + 100 < a) ...
Of course this invokes undefined behavior, and some people get angry when compilers remove the check: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30475
Re:GCC 6.1 Released by anttihaapala on Thursday April 28, 2016 @04:46AM (#11587325)
And of course the code is wrong, because the behaviour is undefined - in 64-bit architectures it is very common to use 64-bit registers for `int` even if in memory `sizeof(int) == 4`; thus `int a = INT_MAX;`, `a + 100` could still be greater than `INT_MAX`.