This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: c++ code that egcs kills ...


>> Has this been seen before? Is there hope of fixing it in a future version?
>
>>   B
>>  / \
>> A   D - E
>>  \ /
>>   C
>
>> In the above inheritance tree, B and C inherit virtually from A. When an
>> object of type E is constructed, D's constructor calls a function in A
>> which in turn calls a virtual function overridden by D. This requires a
>> downcast from type A to type D, and egcs incorrectly adjusts the object
>> pointer, forgetting the size of E's member data.
>
> I believe this is a known problem in the vtable-thunks implementation.
> You may work around it by rebuilding libstdc++ with -fno-vtable-thunks 
> and compiling any C++ program with -fno-vtable-thunks.

Does this mean it will be fixed in egcs-1.1?

Glenn W. Bach
PMA Network/Systems Manager
California Institute of Technology

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.6.2

mQCNAzQxQucAAAEEAKDRj+qxIVg4sk71CigXG+DanD23/JSi4PxR78F0qVVnyCV3
qejYSw8wHdisMeWQb+m6jvm7MpfYar+H3DlalMJ69Tm4DLKMU4Bams+kVEiETis9
8Vj9jLaZ0SvG4vOZj69HcqhEnX8COtqmCBjECy/5wQMFCB1K3h6QzWp9VWLlAAUR
tClHbGVubiBXLiBCYWNoIDxnbGVubkBkb2Rnc29uLmNhbHRlY2guZWR1Pg==
=Uwn5
-----END PGP PUBLIC KEY BLOCK-----




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]