gcc/testsuite/g++.dg/warn/Wunused-function4.C
raw| 1 | // PR c++/80598 |
| 2 | // { dg-do compile } |
| 3 | // { dg-options "-Wunused-function" } |
| 4 | |
| 5 | static void |
| 6 | foo () // { dg-bogus "defined but not used" } |
| 7 | { |
| 8 | } |
| 9 | |
| 10 | static void |
| 11 | bar () // { dg-warning "defined but not used" } |
| 12 | { |
| 13 | } |
| 14 | |
| 15 | template <class T> |
| 16 | int |
| 17 | baz (T x) |
| 18 | { |
| 19 | foo (); |
| 20 | return 0; |
| 21 | } |