Article View: gnu.g++
Article #511G++ bug/question
From: Michael Gleicher
Date: Fri, 23 Feb 1990 20:01
Date: Fri, 23 Feb 1990 20:01
35 lines
1480 bytes
1480 bytes
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
Technical Details
Message-ID:
<GLEICHER.90Feb23150130@OREO.GRAPHICS.CS.CMU.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!pt.cs.cmu.edu!OREO.GRAPHICS.CS.CMU.EDU!gleicherShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!pt.cs.cmu.edu!OREO.GRAPHICS.CS.CMU.EDU!gleicher From: gleicher@CS.CMU.EDU (Michael Gleicher) Newsgroups: gnu.g++ Subject: G++ bug/question Message-ID: <GLEICHER.90Feb23150130@OREO.GRAPHICS.CS.CMU.EDU> Date: 23 Feb 90 20:01:30 GMT Sender: gleicher@OREO.GRAPHICS.CS.CMU.EDU Distribution: gnu Organization: School of Computer Science, Carnegie Mellon University Lines: 35