Commit 01e1df9f by Jason Merrill

re PR c++/84221 (spurious -Wunused warning on a variable of a template type declared unused)

PR c++/84221
* g++.dg/warn/Wunused-var-32.C: Test explicit specialization.

From-SVN: r259106
parent dbaee589
......@@ -2,8 +2,10 @@
// { dg-additional-options -Wunused }
template <class T> struct __attribute((unused)) A { };
template <> struct A<char> { };
void f (void)
{
A<int> a; // shouldn't warn
A<char> ac; // { dg-warning "unused" }
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment