https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107521
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- The funny part is clang says: implementation-defined whether distinct literals will have distinct addresses In ____clang____, the result of such a comparison is unspecified, so it is not a constant expression. I think that means it is not a bug in either GCC nor clang. Just libstdc++ depends on GCC (implementation defined) behavior here ...