This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: 4.0 bug advice? : wrong virtual function called
- From: Joe Buck <Joe dot Buck at synopsys dot COM>
- To: Benjamin Redelings I <bredelin at ucla dot edu>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 10 Feb 2005 14:57:20 -0800
- Subject: Re: 4.0 bug advice? : wrong virtual function called
- References: <420BC56F.70608@ucla.edu>
On Thu, Feb 10, 2005 at 12:34:55PM -0800, Benjamin Redelings I wrote:
> Hello,
> I am currently narrowing down a testcase which is rather strange. I
> have a somewhat contorted class hierarchy which involved virtual
> inheritance.
> At one point I call A->clone(), but gdb clearly shows that what is
> being called is A->rates(), where clone and rates are both virtual
> functions.
> Does this sound like a known bug?
The most common cause of this symptom is that A.h was modified to add a
new virtual function, but you have some object file that still uses the
old version and needs to be recompiled.