This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/36921] comparsion does not have mathematical meaning is not correct
- From: "deba at inf dot elte dot hu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Jul 2008 14:43:42 -0000
- Subject: [Bug c++/36921] comparsion does not have mathematical meaning is not correct
- References: <bug-36921-16097@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from deba at inf dot elte dot hu 2008-07-25 14:43 -------
(In reply to comment #3)
> What Andrew means by "example" is a short, self-contained, compilable testcase
> that shows the undesired behaviour.
>
struct A {};
A operator<(A, A) { return A(); }
int main() {
A() < A() < A(); // should not emit warning
1 < 2 < 3; // should emit warning
return 0;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36921