https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78420
--- Comment #7 from Tomasz Kamiński ---
> No, it's very much allowed to do that. But I'm skeptical that it's allowed
> to turn !(a{}(a,b) && !std::less(b,a)
being false, when std::less{}(a,b) and std::less{}(b,a) are both false,
and in contrast
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78420
--- Comment #6 from Jason Merrill ---
(In reply to Tomasz Kamiński from comment #4)
> Oh, you mean that compiler is not allowed to turn comparison of p == b into
> false at compile time, using 5.10 [expr.eq] p2.1?
No, it's very much allowed to
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78420
--- Comment #5 from Andrew Pinski ---
I think this deserves a Defect report to the C++ committee because even though
std::less requires total order, < and <= usage are undefined if used with two
different arrays.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78420
--- Comment #4 from Tomasz Kamiński ---
Oh, you mean that compiler is not allowed to turn comparison of p == b into
false at compile time, using 5.10 [expr.eq] p2.1?
Some reference from clang: https://llvm.org/bugs/show_bug.cgi?id=13507. Note
t
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78420
--- Comment #3 from Tomasz Kamiński ---
> I don't see this as prohibiting the transformation. The standard seems to be
> saying that they might or might not compare as equal, which presumably
> depends on how variables are laid out in memory.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78420
Jason Merrill changed:
What|Removed |Added
CC||jason at gcc dot gnu.org
--- Comment #2