Trying to compile the attached preprocessed code (from WebKit) results in ../../../JavaScriptCore/wtf/HashTraits.h:61: error: static data member 'WTF::GenericHashTraitsBase<false, const WebCore::<unnamed>::CommandImp*>::emptyValueIsZero' used, but not defined ../../../JavaScriptCore/wtf/HashTraits.h:62: error: static data member 'WTF::GenericHashTraitsBase<false, const WebCore::<unnamed>::CommandImp*>::needsDestruction' used, but not defined ../../../JavaScriptCore/wtf/HashTraits.h:114: error: static data member 'WTF::HashTraits<const WebCore::<unnamed>::CommandImp*>::emptyValueIsZero' used, but not defined ../../../JavaScriptCore/wtf/HashTraits.h:115: error: static data member 'WTF::HashTraits<const WebCore::<unnamed>::CommandImp*>::needsDestruction' used, but not defined ../../../JavaScriptCore/wtf/HashTraits.h:61: error: static data member 'WTF::GenericHashTraitsBase<false, std::pair<WebCore::StringImpl*, const WebCore::<unnamed>::CommandImp*> >::emptyValueIsZero' used, but not defined ../../../JavaScriptCore/wtf/HashTraits.h:62: error: static data member 'WTF::GenericHashTraitsBase<false, std::pair<WebCore::StringImpl*, const WebCore::<unnamed>::CommandImp*> >::needsDestruction' used, but not defined ../../../JavaScriptCore/wtf/HashTraits.h:67: error: static data member 'WTF::GenericHashTraits<std::pair<WebCore::StringImpl*, const WebCore::<unnamed>::CommandImp*> >::needsRef' used, but not defined ../../../JavaScriptCore/wtf/HashTraits.h:165: error: static data member 'WTF::PairBaseHashTraits<WTF::HashTraits<WebCore::StringImpl*>, WTF::HashTraits<const WebCore::<unnamed>::CommandImp*> >::emptyValueIsZero' used, but not defined
The lines where gcc complains about "static data member used, but not defined" are actually the places where the members are defined. -- Summary: "static data member used, but not defined" error on member definition Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: bero at arklinux dot org GCC build triplet: i586-pc-linux-gnu GCC host triplet: i586-pc-linux-gnu GCC target triplet: i586-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34238