[Bug c++/11384] New: [3.4 regression] missing implicit instantiation of template static members
dgregor at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Jun 30 21:00:00 GMT 2003
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.
More information about the Gcc-bugs
mailing list