rfg@paris.ics.uci.edu (Ron Guilmette) (01/21/90)
// g++-01209001.bug.C // Both g++ (1.36.1) and Cfront 2.0 flag an error on attempts to call // a private function member of a base class from within a function // member of a class derived from that base class. // The cfront 2.0 manual says (10.0): "Unless redefined in the derived // class, members of a base class can be referred to as if they were // members of the derived class. // Did I miss something? class base { private: void base_private (void) { } public: base () {} }; class derived : public base { private: void derived_private (void) { } public: void bar (void) { base base_object; derived derived_object; base_object.base_private (); /* ERROR ??? */ derived_object.base_private (); /* ERROR ??? */ derived_object.derived_private (); /* OK */ base_private (); /* ERROR ??? */ derived_private (); /* OK */ } };