This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/14622] New: type mismatch in explicit template instantiation not detected
- From: "jens dot maurer at gmx dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Mar 2004 22:19:39 -0000
- Subject: [Bug c++/14622] New: type mismatch in explicit template instantiation not detected
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following code should produce an error for the explicit
template instantiation, because the type given for the static variable
doesn't match the one in the class template. None of the following
gcc versions produces an error:
gcc version 2.95.3 20010315 (release)
gcc version 3.3
gcc version 3.5.0 20040118 (experimental)
gcc version 3.5.0 20040317 (experimental)
template<class T>
class A
{
static T a;
};
template<class T>
T A<T>::a;
class B
{ };
template
int A<B>::a; // type mismatch
--
Summary: type mismatch in explicit template instantiation not
detected
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jens dot maurer at gmx dot net
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14622