Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!cs.utexas.edu!usc!rutgers!ucsd!ucsdhub!hp-sdd!hplabs!hpda!hpcuhb!hpcllla!hpclisp!shankar From: shankar@hpclisp.HP.COM (Shankar Unni) Newsgroups: comp.lang.c++ Subject: Re: virtual base classes Message-ID: <58170003@hpclisp.HP.COM> Date: 2 Jan 90 21:02:07 GMT References: <8059@cbnewsm.ATT.COM> Organization: Hewlett-Packard Calif. Language Lab Lines: 38 > > A A <<< ********** revised drawing > / | > virtual / | > / | > B C > \ / > \ / virtual > \ / > D > > > (a) there is only *one* A in D. > > *****> no, look again -- there are two, one within the C sub-object > of D and the virtual OA instance: Yeah, I looked at the generated code, but it seemed to me that one of the subobjects was not being used. So I jumped to the conclusions that I posted. Hmm, I suppose I should read the generated code a little more carefully. > *****> cfront actually has a bug in that it is > choosing the instance associated with the > virtual object associated with B -- it should > be ambiguous and will be fixed in 2.1 > > d . PA-> a_mem__1A = 1 ; // generated cfront > Right - that's what I saw, but I tried to diagnose the problem too soon and jumped to the wrong conclusion. Thanks for the clarification. ------- Shankar Unni. HP/California Language Lab.