This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/15867] -Wredundant-decls and explicit template specialization
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Jun 2004 13:29:26 -0000
- Subject: [Bug c++/15867] -Wredundant-decls and explicit template specialization
- References: <20040608051649.15867.ghost@cs.msu.su>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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