This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/36921] comparsion does not have mathematical meaning is not correct



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]