News for hackers. Stuff that matters.
Re:A glimpse of undefined behavior in C by twoodfin on Saturday November 30, 2013 @08:08PM (#6825553)
It's undefined. That means the compiler and runtime can choose to segfault, do something that looks right, silently corrupt your program, launch the nuclear missiles, whatever. And there's no requirement that this behavior be repeatable, so the code can work with debug flags turned on but fail in a release build.

You can never rely on your compiler's implementation of undefined behavior.

Re:A glimpse of undefined behavior in C by ygra on Sunday December 01, 2013 @10:05AM (#6827488)
> You can never rely on your compiler's implementation of undefined behavior.

I wish I could somehow get my coworker to understand this. He's mostly "Yeah, well, I know it's undefined, but there's really no way this could be anything else than <foo>. I know what the CPU does there."