https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107521
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- http://eel.is/c++draft/expr.eq#3 only talks about unspecified behavior if one is a pointer to a start of an object and another to one past the end of another. I believe we implement that in GCC, try e.g. constexpr const char *f (const char* a, const char *b) { if (a == b) return a; return b; } char a, b; constexpr const char *k = f(&a, &b); constexpr const char *l = f(&a, &b + 1); When string literals are involved, I think this is PR86369 instead, and Jason said he thinks GCC is correct there, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86369#c8