This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11384] New: [3.4 regression] missing implicit instantiation of template static members
- From: "dgregor at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Jun 2003 21:00:55 -0000
- Subject: [Bug c++/11384] New: [3.4 regression] missing implicit instantiation of template static members
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11384
Summary: [3.4 regression] missing implicit instantiation of
template static members
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dgregor at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: powerpc-apple-darwin6.6
GCC host triplet: powerpc-apple-darwin6.6
GCC target triplet: powerpc-apple-darwin6.6
With the following simple program, the mainline compiler does not emit a definition for
foo<int>::_S_something, even though it is required:
template<typename T>
struct foo
{
static const T _S_something;
};
template<typename T>
const T foo<T>::_S_something = T();
int main()
{
const int* p = &foo<int>::_S_something;
return 0;
}
This bug appears related to c++/10804, which reports the same problem but with static member
functions.