This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/15867] -Wredundant-decls and explicit template specialization


------- Additional Comments From bangerth at dealii dot org  2004-06-08 13:29 -------
Confirmed. It has nothing to do with an operator function, though: 
----------------- 
template <typename T> struct S {  
    void foo() {}          
};  
  
template<> void S<int>::foo();  
----------------- 
 
We get the same behavior from 2.95 through mainline: 
g/x> /home/bangerth/bin/gcc-3.5*/bin/c++ -Wredundant-decls -c x.cc 
x.cc:5: warning: redundant redeclaration of `void S<T>::foo() [with T = int]' 
in same scope 
x.cc:2: warning: previous declaration of `void S<T>::foo() [with T = int]' 
 
This warning is wrong, though. 
 
W. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
      Known to fail|                            |2.95.3 3.2.3 3.3.4 3.4.0
                   |                            |3.5.0
   Last reconfirmed|0000-00-00 00:00:00         |2004-06-08 13:29:17
               date|                            |


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]