[Bug c++/14622] New: type mismatch in explicit template instantiation not detected
jens dot maurer at gmx dot net
gcc-bugzilla@gcc.gnu.org
Wed Mar 17 22:19:00 GMT 2004
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
More information about the Gcc-bugs
mailing list