News for hackers. Stuff that matters.
Re:What Every C Programmer Should Know About Undefined Behav... by to3m on Thursday January 05, 2017 @06:52AM (#13326403)
The compiler may also assume undefined behaviour can happen, and do something documented, that programmers would probably expect.

Even though the standard imposes no specific requirements, it explicitly calls that out at something you could do: http://port70.net/~nsz/c/c11/n1570.html#3.4.3

But for some reason nobody seems to ever think this is an option.

Re:What Every C Programmer Should Know About Undefined Behav... by lmm on Thursday January 05, 2017 @07:12AM (#13326505)
It wouldn't improve benchmark performance, which is what C compiler writers care about. And at this point in time any programmer who wants that kind of behaviour has probably moved on from C.
Re:What Every C Programmer Should Know About Undefined Behav... by lomnakkus on Wednesday January 11, 2017 @07:33PM (#13378855)
Well, that and undefined behavior sometimes would require absurd amounts of runtime checking (eg. on signed bit shifts, etc.).