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]

ss 19981101 does not like member function pointer assigments ...


  The attached code complains 'X::A() can only be used in a call'. This fails on
both an IRIX6.2 and Linux i586 build. Thanks.


--
  Sen Bonehead: We must control pornography on the internet or one of our
        children is likily to become a president like the one we have now ...
  Roger March, rogmon@{sgi,aol}.com
//
//	Member function pointer problem.
//
class X {
public:
  int a;			// something to play with
  typedef void (X::*mfp)();
  //
  void A()
    { a = 1; }
  //
  mfp do_a;			// the player
  //
  X() :
    a(0)
    { do_a = &A; }
};

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