4 ms·
I shiver when I read the kind of replies you get... The ones that defend idiotic compiler behaviour justified by "optimizations"
by crististm 9y ago
I shiver when I read the kind of replies you get... The ones that defend idiotic compiler behaviour justified by "optimizations"
- jchw 9y agoTo be fair, the point of having a set of "defined behavior" was in part so that compilers could optimize. I still believe this case is a compiler bug, but it is one that can only be invoked with undefined behavior, in which compilers are allowed to do absolutely anything. See also: DeathStation 9000
- Joky 9y agoI'd really suggest watching https://www.youtube.com/watch?v=yG1OZ69H_-o https://www.youtube.com/watch?v=yG1OZ69H_-o
- deleted 9y ago[deleted]
- crististm 9y agohttps://youtu.be/yG1OZ69H_-o?t=401 https://youtu.be/yG1OZ69H_-o?t=401 Thank you very much. Maybe the defenders of idiotic compiler behaviour can go now and hide under a rock. As for the slide at https://youtu.be/yG1OZ69H_-o?t=508 https://youtu.be/yG1OZ69H_-o?t=508 Correct or incorrect programs are defined in terms of the language. With an underspecified language like C you get what you deserve: -O2 being a different language than -O0 I've seen enough of this video where incorrect programs are being equaled to undefined language behavior. I'll stop looking further.