Comment Comment by bobbyi The usual justification for having a concept of "undefined behavior" at all is specifically to allow compilers to "rule out this possibility" so they can make this sort of optimization. parent bobbyi 3 years ago