rfg@paris.ics.uci.edu (Ronald Guilmette) (02/15/90)
// 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; }