Debian Codegraph @

gcc/testsuite/g++.dg/warn/unused-fn1.C

raw
1 // PR c++/80916
2 // { dg-options "-Os -Wunused" }
3
4 struct j {
5 virtual void dispatch(void *) {}
6 };
7 template <typename>
8 struct i : j {
9 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]
10 };
11 namespace {
12 struct l : i<l> {};
13 }
14 void f(j *k) {
15 k->dispatch(0);
16 }