On 28/05/15 01:06, Jim Graham wrote: > Where do you see evidence that it can crash?
It's what the language specification says. Undefined behaviour is unconstrained: it can do anything. Demons might fly out of your nose. We have seen with GCC that apparently "harmless" code (a read just beyond the end of an array) can, for example, result in an infinite loop. In this case, it is quite possible that GCC could infer that the two memory regions accessed by memcpy do not overlap. Andrew.