[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/11793] Add suggestion to error "undefined reference to `vtable f

From: zilla at kayari dot org
Subject: [Bug ld/11793] Add suggestion to error "undefined reference to `vtable for XXX'"
Date: 7 Jul 2010 14:57:45 -0000

------- Additional Comments From zilla at kayari dot org  2010-07-07 14:57 
I'll just repeat my claim that outputting anything like "did you forget to make
it pure?" is probably worse than the status quo.

Forgetting to define a virtual function (or not linking to the object that
defines it) is far more common in my experience, and searching the web for this
error confirms that.  I didn't find any instances of this error on the web where
someone meant to declare a function as pure virtual but omitted the 

The most common reason for this error is declaring a virtual function and not
defining it, which is also the problem in this bug report (the fact that the
non-pure declaration was accidental is largely irrelevant; it was declared and
not defined.)

If any suggestion is made to the user, it should be to ensure that all non-pure
virtual functions are defined.  Which is what the GCC FAQ already says:



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]