[gnu.g++] G++ bug/question

gleicher@CS.CMU.EDU (Michael Gleicher) (02/24/90)

The following program causes g++ 1.36.1 to "g++: Program got fatal Signal 10"
(which is a bus error). The same problem comes when I try to do similar things
in a real program. The line which causes the problem is the definition of
H::g().

I am running an old version of g++ (1.36.1), but before upgrading, I'd like to
be sure this problem has been solved.

//------- file mi-test.cc -----------//
class A { public: virtual void f(); };
class B { public: virtual void f(); };

class D : public A,public B { 
 public: 
  virtual void f();
  virtual void g();
};

class H : public A, public D {
 public:
  virtual void f();
  virtual void g();
};
//----------------------------------------------//

One other related question:
I have to define H::f() (and D::f()) otherwise g++ tells me I have an
ambiguous method name. If f wasn't virtual, I don't have this problem. Is this
supposed to be a feature?

Oh yea, Sun 3/60 w/12meg running Mach (if that makes a difference).

Thanks,
	Mike