[Bug c++/14199] New: [tree-ssa regression] Unjustified warning about unused variable

bangerth at dealii dot org gcc-bugzilla@gcc.gnu.org
Wed Feb 18 20:25:00 GMT 2004


Here is some recent regression I see on tree-ssa. I don't have a recent 
mainline checked out, so can't test whether this also happens on mainline, 
but here is what happens: 
----------------------------- 
struct X { 
    static void foo (); 
}; 
 
template <typename T> 
void foo (const T &t) { 
  t.foo(); 
} 
 
template void foo (const X &); 
------------------- 
 
deal.II/base> c++ -c -Wunused x.cc -W -Wall  
x.cc: In function `void foo(const T&) [with T = X]': 
x.cc:10:   instantiated from here 
x.cc:6: warning: unused parameter 't' 
 
This warning is clearly bogus! 
 
W.

-- 
           Summary: [tree-ssa regression] Unjustified warning about unused
                    variable
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bangerth at dealii dot org
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14199



More information about the Gcc-bugs mailing list