https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56955
--- Comment #17 from Dan Gohman <sunfish at mozilla dot com> --- (In reply to Richard Biener from comment #16) > One reason for why realloc is "hard" is that there is no language that says > it is undefined to access the object via the old pointer, but there is only > language that says the old and the new pointer values may be equal. C89 was unclear, but C99 and now C11 7.22.3.5 say realloc deallocates the old pointer, and there is no mention of the case where the pointers happen to be equal. The interpretation of this to mean that old and new pointers don't alias, even when being comparison-equal, has a serious following.