Debian Codegraph @

gcc/testsuite/g++.dg/warn/Wunused-17.C

raw
1 // PR c++/41109, 41110, 41134
2 // { dg-options "-Wunused" }
3
4 int memory_consumption(const int &t) { return sizeof(t); }
5
6 int s;
7 int g() { return memory_consumption(s); }
8
9 template <int> struct X { static const int s = 2; };
10
11 template <typename T> int f() {
12 const unsigned int dim = 2;
13 return X<dim>::s;
14 }
15
16 template int f<int>();
17
18 static int i;
19 template <typename> int h() { return i; }