https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106064
--- Comment #13 from Alex Coplan <acoplan at gcc dot gnu.org> --- (In reply to Richard Earnshaw from comment #12) > (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 :) Sure, but Jakub's reply seemed to get at some underlying principle as opposed to just saying "zero-sized objects are a GNU extension and we declare this case to be undefined".