]> gcc.gnu.org Git - gcc.git/blob - gcc/testsuite/g++.dg/cpp0x/Wunused-variable-1.C
PR c++/92590 - wrong handling of inherited default ctor.
[gcc.git] / gcc / testsuite / g++.dg / cpp0x / Wunused-variable-1.C
1 // PR c++/71442
2 // { dg-do compile { target c++11 } }
3 // { dg-options "-Wunused-variable" }
4
5 struct C
6 {
7 template<typename... Ts>
8 int operator()(Ts &&...)
9 {
10 return sizeof...(Ts);
11 }
12 };
13
14 int
15 foo ()
16 {
17 C {} (1, 1L, 1LL, 1.0);
18 return 0;
19 }
20
21 template<int N>
22 void
23 bar ()
24 {
25 char a; // { dg-warning "unused variable" }
26 short b; // { dg-warning "unused variable" }
27 int c; // { dg-warning "unused variable" }
28 long d; // { dg-warning "unused variable" }
29 long long e; // { dg-warning "unused variable" }
30 float f; // { dg-warning "unused variable" }
31 double g; // { dg-warning "unused variable" }
32 }
33
34 void
35 baz ()
36 {
37 bar <0> ();
38 }
This page took 0.038236 seconds and 5 git commands to generate.