--nextPart1910296.R3DlB9HRvd Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Guillaume Laurent wrote: >On Sunday 19 September 2004 15:24, Thiago Macieira wrote: >> - a constructor for one of the classes inheriting the virtual base calls >> one function which in turn calls an overridden virtual function > >Virtual functions do not work in ctors in general. They work fine in g++ 3.3/3.4 and there's nothing in the standard that=20 prevents us from doing that. The problem you're alluding to is that people expect constructors to call=20 the overriden functions in more-derived classes. That isn't supported by=20 the standard: both g++ 2.95 and the 3.x series work correctly. Calls to=20 virtual functions inside a constructor are not virtual at all. The problem in this case is that a virtual function is called *indirectly*= =20 from inside the constructor: the constructor calls a function which in turn= =20 calls the virtual function. Leo Savernik wrote: >Why discouraged? This is the very first gross bug that I've ever >encountered with 2.95=20 Exactly. So there's a major bug. Therefore, it's people using it that shoul= d=20 properly fix their compilers, not us working around the bugs. g++ 2.95.4 on Linux is known now to produce invalid code. It should no=20 longer be used. As a compromise till people upgrade their compilers (to a=20 2.95.5, for instance, if that ever comes along), we should provide code=20 that doesn't trigger the bug for a while, but not for long. As for its use on other platforms, I said "not supported" meaning that the= =20 user's problem of making it work, not ours. =2D-=20 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 --nextPart1910296.R3DlB9HRvd Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQBBTaseM/XwBW70U1gRAvheAJ9oWqenDHX5s+uWKh0uXJuu1TZDMwCgpBki bftjMNGvGY+v1yQvRb0H2qo= =HRsC -----END PGP SIGNATURE----- --nextPart1910296.R3DlB9HRvd--