Compiling the following code snippet, I get a strange warning: ------------------------------------------------- struct A { virtual inline void foo() const=0; void bar() { foo(); } }; ------------------------------------------------- The warning reads: warn.cc:3: warning: inline function `virtual void A::foo() const' used but never defined The keyword "inline" doesn't make much sense, but the warning is confusing IMHO. The warning was introduced in gcc 3.3, so I rate this as a regression.
One of the reason the warning was introduced in 3.3 was because -Winline was not say when something was not inlined, now it looks like it is over warning. It is most likely connected with bug 10929.
I have a small patch which fixes this, will post soon.
The regression in 11067 was introduced/exposed by this patch (I see that Andrew has a patch, but this might still be useful): --- gcc/gcc/cp/ChangeLog --- > 2002-12-26 Nathan Sidwell <nathan@codesourcery.com> > > PR c++/4803 > * decl2.c (mark_used): Defer inline functions. > (finish_file): Merge deferred_fns loops. Check all used > inline functions have a definition. > * method.c (make_thunk): Thunks are not inline.
The patch is here: http://gcc.gnu.org/ml/gcc-patches/2003-06/msg02517.html However, I think it's wrong, see http://gcc.gnu.org/ml/gcc-patches/2003-06/msg02519.html http://gcc.gnu.org/ml/gcc-patches/2003-06/msg02543.html W.
The warning is right so closing as not going to be fixed.