I found another failure, this time already when compiling, not when linking. I
didn't see that when reporting bug 34178. Probably it has been introduced in
the meantime.
struct ListElem
{
const ListElem *next;
};
struct Base
{
static const ListElem Head;
};
template <typename Inherited> struct Derived: public Inherited
{
static const ListElem Head;
};
const ListElem Base::Head = { 0 };
template<typename Inherited> const ListElem Derived<Inherited>::Head = {
&Inherited::Head
};
template class Derived<Base>;
int main(){}
g++-4.3.0 -frepo -c -o test.o test.cpp
test.cpp:18: error: static data member 'Derived<Base>::Head' used, but not
defined
reproducable (at least for me) with gcc version 4.3.0 20071123
gcc-4.2.2 and earlier get it right
--
Summary: [4.3] Compile Error about undefined symbol using -frepo
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rbuergel at web dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34340