@regehr if it's eliding `if (foo == NULL)` checks that the programmer asked for, the compiler is broken. If it's making any aliasing assumptions, so that it can omit memory loads that the programmer asked for, it's broken.
What use is a standard that allows a compiler to ignore the source code it's given?
Does the spec assume a flat linear address space? Does it prohibit Near and Far pointers, that riddled x86 code bases, with multiple memory models?
@hyc @regehr That's not what it means though. Undefined beams that the compiler can assume it will never happen. That's a very different thing.
Now, that doesn't mean that I agree that the way C is specified is good. It's very much the opposite. But the concept still makes sense, even if it's a bad concept.
@loke @regehr Undefined meant ... https://feross.org/gcc-ownage/
I was a gcc maintainer back then, I used to use this to start hack all the time...