OSDN Git Service

PR c++/36254
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / warn / noeffect7.C
1 // PR c++/8057
2 // Don't give a "statement has no effect" warning when declaring a
3 // template, only when instantiating it.
4 // { dg-do compile }
5 // { dg-options "-Wunused" }
6 struct Y { static int i; };
7 template <typename T> class X { X() { Y::i; }; };
8 class Z { Z() { Y::i; }; }; // { dg-warning "no effect" }