From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,2130a6da39d0b2da X-Google-Attributes: gidfee84,public From: dmurphy@motie.zko.dec.com (Dennis Murphy) Subject: Re: DEC cxx bug (default copy operator and virtual inheritance) Date: 1995/08/16 Message-ID: <40t1ob$6ju@nntpd.lkg.dec.com>#1/1 X-Deja-AN: 108281683 distribution: world references: organization: Digital Equipment Corporation reply-to: dmurphy@zko.dec.com newsgroups: comp.unix.osf.osf1 >Here is a bug in default copy operator and virtual inheritance in >DEC C++ V5.0-3 for DEC OSF/1 (Alpha) I took a look at this problem and I'm entering a bug report related to it. The problem is not the constructor but rather appears to be an invalid size for objects of class B. Here's an example... motie.zko.dec.com> cxx newsbug1_size.C motie.zko.dec.com> tail newsbug1_size.C << (char*)&c.a_ - (char*)&c << endl; } void main () { cout << "class A size : " << sizeof(A) << endl; cout << "class B size : " << sizeof(B) << endl; cout << "class C size : " << sizeof(C) << endl; } motie.zko.dec.com> a.out class A size : 4 class B size : 24 class C size : 24 motie.zko.dec.com> If class B has a size of 24 class C objects may not be of size 24 also as class C defines an additional data member that's destroyed in the copy of b to c. I don't have a workaround other than those you've observed. Dennis Murphy