This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: virtual inheritance problem
- To: Wolfgang Bangerth <wolf at gaia dot IWR dot Uni-Heidelberg dot De>
- Subject: Re: virtual inheritance problem
- From: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Date: 10 Mar 1999 11:27:21 -0300
- Cc: egcs at cygnus dot com, Ryszard Kabatek <rysio at rumcajs dot chemie dot uni-halle dot de>
- References: <Pine.SOL.4.05.9903101322220.3879-100000@kronos>
On Mar 10, 1999, Wolfgang Bangerth <wolf@gaia.IWR.Uni-Heidelberg.De> wrote:
> Ryszard Kabatek <rysio@rumcajs.chemie.uni-halle.de>
> Wed, 10 Mar 1999 10:42:23 +0100 (CET) writes:
>> Egcs-1.1.1 produces wrong code:
> You are calling virtual functions from the constructor, i.e. at a time
> where derived classes may not have been able to
> The program is therefore bound to produce rather random output.
Nope, the program is well-defined and should produce the expected
results, but it triggers a known bug in the -fvtable-thunks
implementation. Unfortunately, this option is enabled by default on
GNU/Linux, despite the known bug, because some people consider the
performance gain brought with this option more important than avoiding
the bug in the rare conditions in which it is triggered. It's a pity
that users are not even warned about the problem. :-(
But, AFAIK, there are people working to fix it.
--
Alexandre Oliva http://www.dcc.unicamp.br/~oliva aoliva@{acm.org,computer.org}
oliva@{dcc.unicamp.br,gnu.org,egcs.cygnus.com,samba.org}
Instituto de Computação, Universidade Estadual de Campinas, SP, Brasil