https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106064
--- Comment #12 from Richard Earnshaw <rearnsha at gcc dot gnu.org> --- (In reply to Alex Coplan from comment #11) > (In reply to Jakub Jelinek from comment #8) > > The IMHO UB case is for a != b when one address is at the start of one > > object and the other address is at the end of another one > > Just to dig a little deeper on this, what makes this case UB? Is there > something in the standard to this effect? As stated in #6, zero-sized objects are a GNU extension. I guess that means we get to define what the behaviour should be :)