https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65642
Marek Polacek <mpolacek at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEW Assignee|mpolacek at gcc dot gnu.org |unassigned at gcc dot gnu.org Target Milestone|5.0 |6.0 --- Comment #6 from Marek Polacek <mpolacek at gcc dot gnu.org> --- I think that fixing the third case is going to be harder, and doesn't look like something that should be fixed in cp/constexpr.c. While fold_comparison is able to fold the NE_EXPR here: constexpr char s1[] = "s1"; constexpr char s2[] = "s2"; constexpr auto eq = (s2 + 2) != (s2 + 1); it isn't able to fold it here: constexpr char s1[] = "s1"; constexpr char s2[] = "s2"; constexpr auto eq = (s1 + 2) != (s2 + 1); So not sure what to do here, but in any case, I think it is a GCC 6 material.