2 // Don't give a "statement has no effect" warning when declaring a
3 // template, only when instantiating it.
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" }