[comp.lang.c++] cfront 2.0 bug 900211_06

rfg@paris.ics.uci.edu (Ronald Guilmette) (02/15/90)

// cfront 2.0 bug 900211_06

// cfront flags as errors all attempts to compare two compatible
// pointer-to-member-function values.

// The Cfront 2.0 Reference Manual suggest that there should be at least two
// ways in which such comparisons could be considered to be legal.  First,
// sections 5.9 and 5.10 describe the semantics of both ordered and unordered
// comparisons for pointers to members.  Also, since pointer-to-member-function
// values can be implicitly cast to void*, the comparsons could also be
// interpreted as comparisons between pairs of void*'s.

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;	// gets bogus error
  result = p0 != p1;	// gets bogus error

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