From: Jason Merrill Date: Wed, 4 Apr 2018 19:59:20 +0000 (-0400) Subject: re PR c++/84221 (spurious -Wunused warning on a variable of a template type declared... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=01e1df9ff6f1742b31a033fdb65c8ebb5ea0e983;p=gcc.git 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 --- diff --git a/gcc/testsuite/g++.dg/warn/Wunused-var-32.C b/gcc/testsuite/g++.dg/warn/Wunused-var-32.C index 5558f9361fc..8aaf381ffa6 100644 --- a/gcc/testsuite/g++.dg/warn/Wunused-var-32.C +++ b/gcc/testsuite/g++.dg/warn/Wunused-var-32.C @@ -2,8 +2,10 @@ // { dg-additional-options -Wunused } template struct __attribute((unused)) A { }; +template <> struct A { }; void f (void) { A a; // shouldn't warn + A ac; // { dg-warning "unused" } }