This is the mail archive of the
mailing list for the GCC project.
Re: c++ code that egcs kills ...
- To: egcs-bugs at cygnus dot com
- Subject: Re: c++ code that egcs kills ...
- From: "Glenn W. Bach" <glenn at dodgson dot wonderland dot caltech dot edu>
- Date: Thu, 20 Aug 1998 16:52:52 -0700
>> Has this been seen before? Is there hope of fixing it in a future version?
>> / \
>> A D - E
>> \ /
>> 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-----
-----END PGP PUBLIC KEY BLOCK-----