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]
Other format: [Raw text]

Re: 4.0 bug advice? : wrong virtual function called


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.


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