This is the mail archive of the gcc@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: virtual inheritance problem


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



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