Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!jarthur!uci-ics!gateway From: rfg@paris.ics.uci.edu (Ronald Guilmette) Newsgroups: comp.lang.c++ Subject: cfront 2.0 bug 900211_05 Message-ID: <25DA6576.22904@paris.ics.uci.edu> Date: 15 Feb 90 08:16:54 GMT Organization: UC Irvine Department of ICS Lines: 35 // cfront 2.0 bug 900211_05 // cfront flag as errors attempts to do unordered comparisions between pairs // of compatible pointer-to-member values. // Section 5.9 of the 2.0 Reference Manual says "If two pointers point to // non-static members of the same object the pointer to the member defined // last compares higher..." // One must conclude from this that ordered comparisons between pointer-to- // member values is legal. struct struct0 { int struct0_member_0; int struct0_member_1; }; int struct0::*p0; int struct0::*p1; int result; void global_function_0 () { result = p0 == p1; /* OK */ result = p0 != p1; /* OK */ result = p0 > p1; /* gets bogus error */ result = p0 < p1; /* gets bogus error */ result = p0 >= p1; /* gets bogus error */ result = p0 <= p1; /* gets bogus error */ } int main () { return 0; }