https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80916

--- Comment #7 from ensadc at mailnesia dot com ---
Note that the "never defined" part is also misleading: the warning persists
when `i::dispatch` does have a definition
(https://wandbox.org/permlink/MKif1shXFjt7aT6C):

struct j {
  virtual void dispatch(void *) {}
};
template <typename>
struct i : j {
  void dispatch(void *) {} // warning: 'void i< <template-parameter-1-1>
>::dispatch(void*) [with <template-parameter-1-1> = {anonymous}::l]' declared
'static' but never defined [-Wunused-function]
};
namespace {
struct l : i<l> {};
}
void f(j *k) {
  k->dispatch(0);
}

Reply via email to