[MAJOR BUG] g++ 2.95.x generates invalid code for KDE 3.3.0
Thiago Macieira
thiago.macieira at kdemail.net
Mon Sep 20 04:11:59 BST 2004
Leo Savernik wrote:
>Am Montag, 20. September 2004 01:46 schrieb Thiago Macieira:
>[...]
>
>> If the Derived constructor calls Base::function which in turn calls the
>> virtual function "virtual_function", the call should be routed to
>> Derived::virtual_function, even if the construction is not yet complete.
>
>Is this behaviour mandated by the C++ standard?
Yes. That's what both g++ versions do.
The difference is g++ 2.95 gets it wrong when "Base" is a non-primary
virtual base and Derived has at least one member variable.
Anyways, the case is now fixed. Instead of the call trace going
KStreamSocket::KStreamSocket -> KSocketBase::setBlocking ->
KClientSocketBase::setSocketOptions, I've eliminated the middle man and
made the call to setSocketOptions directly. And since setSocketOptions
doesn't call any virtual function inherited from KSocketBase, the problem
won't show up again.
--
Thiago Macieira - Registered Linux user #65028
thiago (AT) macieira (DOT) info
ICQ UIN: 1967141 PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040920/e86615cd/attachment.sig>
More information about the kde-core-devel
mailing list