WebCore does not currently build with GCC if C++11 is enabled. The issue is caused by private virtual destructors which are meaningless since private destructors are considered deleted and can not be virtual.
Created attachment 191747 [details] Patch
Well, more specifically while virtual destructors can be private, you can not inherit from the class if they are, which causes compile errors in MemoryInstrumentation.
Comment on attachment 191747 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=191747&action=review > Source/WebCore/ChangeLog:8 > + Private destructors are considered deleted and can not be virtual. This is surprising. Is that a gcc bug?
What version of GCC is this?
(In reply to comment #3) > (From update of attachment 191747 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=191747&action=review > > > Source/WebCore/ChangeLog:8 > > + Private destructors are considered deleted and can not be virtual. > > This is surprising. Is that a gcc bug? That statement wasn't precise, see comment #2. I think MSVC has the same issue, but can be disabled as a warning. The following hack in MemoryInstrumentation.h, will probably also be fixed by this patch: #pragma warning(disable: 4624) // Disable warning: destructor could not be generated because a base class destructor is inaccessible.
Created attachment 191960 [details] Patch Corrected changelog
(In reply to comment #4) > What version of GCC is this? 4.7
Sorry for not noticing the comment at first. Anyway, deferring to Anders for review.
Anders, does this look okay to you?
What's the error message again?
(In reply to comment #10) > What's the error message again? Here is one example: /src/webkit/Source/WTF/wtf/MemoryInstrumentation.h: In instantiation of 'struct WTF::MemoryInstrumentation::IsInstrumented<WebCore::StyleRuleCSSStyleDeclaration>::Base': /src/webkit/Source/WTF/wtf/MemoryInstrumentation.h:148:41: required by substitution of 'template<class U> static WTF::MemoryInstrumentation::IsInstrumented<Type>::no WTF::MemoryInstrumentation::IsInstrumented::deduce(U*, WTF::MemoryInstrumentation::IsInstrumented<Type>::Helper<void (WTF::MemoryInstrumentation::IsInstrumented<Type>::BaseMixin::*)(WTF::MemoryObjectInfo*)const, (& U:: reportMemoryUsage)>*) [with U = U; Type = WebCore::StyleRuleCSSStyleDeclaration] [with U = WTF::MemoryInstrumentation::IsInstrumented<WebCore::StyleRuleCSSStyleDeclaration>::Base]' /src/webkit/Source/WTF/wtf/MemoryInstrumentation.h:152:76: required from 'const bool WTF::MemoryInstrumentation::IsInstrumented<WebCore::StyleRuleCSSStyleDeclaration>::result' /src/webkit/Source/WTF/wtf/MemoryInstrumentation.h:283:5: required from 'void WTF::reportMemoryUsage(const T*, WTF::MemoryObjectInfo*) [with T = WebCore::StyleRuleCSSStyleDeclaration]' /src/webkit/Source/WTF/wtf/MemoryInstrumentation.h:292:9: required from 'void WTF::MemoryInstrumentation::addObjectImpl(const T*, WTF::MemoryObjectInfo*, WTF::MemberType, const char*) [with T = WebCore::StyleRuleCSSStyleDeclaration]' /src/webkit/Source/WTF/wtf/MemoryInstrumentation.h:316:5: required from 'void WTF::MemoryInstrumentation::addObjectImpl(const WTF::RefPtr<T>*, WTF::MemoryObjectInfo*, WTF::MemberType, const char*) [with T = WebCore::StyleRuleCSSStyleDeclaration]' /src/webkit/Source/WTF/wtf/MemoryInstrumentation.h:186:13: required from 'static void WTF::MemoryInstrumentation::MemberTypeTraits<T>::addObject(WTF::MemoryInstrumentation*, const T&, WTF::MemoryObjectInfo*, const char*, WTF::MemberType) [with T = WTF::RefPtr<WebCore::StyleRuleCSSStyleDeclaration>; WTF::MemoryInstrumentation = WTF::MemoryInstrumentation]' /src/webkit/Source/WTF/wtf/MemoryInstrumentation.h:171:9: required from 'void WTF::MemoryInstrumentation::addObject(const T&, WTF::MemoryObjectInfo*, const char*, WTF::MemberType) [with T = WTF::RefPtr<WebCore::StyleRuleCSSStyleDeclaration>]' /src/webkit/Source/WTF/wtf/MemoryInstrumentation.h:245:13: required from 'void WTF::MemoryClassInfo::addMember(const M&, const char*, WTF::MemberType) [with M = WTF::RefPtr<WebCore::StyleRuleCSSStyleDeclaration>]' /src/webkit/Source/WebCore/css/CSSFontFaceRule.cpp:78:70: required from here /src/webkit/Source/WTF/wtf/MemoryInstrumentation.h:141:16: error: deleted function 'virtual WTF::MemoryInstrumentation::IsInstrumented<WebCore::StyleRuleCSSStyleDeclaration>::Base::~Base()' In file included from /src/webkit/Source/WebCore/css/CSSFontFaceRule.cpp:25:0: /src/webkit/Source/WebCore/css/PropertySetCSSStyleDeclaration.h:105:13: error: overriding non-deleted function 'virtual WebCore::StyleRuleCSSStyleDeclaration::~StyleRuleCSSStyleDeclaration()' In file included from /src/webkit/Source/WebCore/platform/PlatformMemoryInstrumentation.h:34:0, from /src/webkit/Source/WebCore/dom/WebCoreMemoryInstrumentation.h:34, from /src/webkit/Source/WebCore/css/CSSRule.h:26, from /src/webkit/Source/WebCore/css/CSSFontFaceRule.h:25, from /src/webkit/Source/WebCore/css/CSSFontFaceRule.cpp:23: /src/webkit/Source/WTF/wtf/MemoryInstrumentation.h:141:16: note: 'virtual WTF::MemoryInstrumentation::IsInstrumented<WebCore::StyleRuleCSSStyleDeclaration>::Base::~Base()' is implicitly deleted because the default definition would be ill-formed: In file included from /src/webkit/Source/WebCore/css/CSSFontFaceRule.cpp:25:0: /src/webkit/Source/WebCore/css/PropertySetCSSStyleDeclaration.h:105:13: error: 'virtual WebCore::StyleRuleCSSStyleDeclaration::~StyleRuleCSSStyleDeclaration()' is private In file included from /src/webkit/Source/WebCore/platform/PlatformMemoryInstrumentation.h:34:0, from /src/webkit/Source/WebCore/dom/WebCoreMemoryInstrumentation.h:34, from /src/webkit/Source/WebCore/css/CSSRule.h:26, from /src/webkit/Source/WebCore/css/CSSFontFaceRule.h:25, from /src/webkit/Source/WebCore/css/CSSFontFaceRule.cpp:23: /src/webkit/Source/WTF/wtf/MemoryInstrumentation.h:141:16: error: within this context
Anders: Any input on the build error?
Comment on attachment 191960 [details] Patch Clearing flags on attachment: 191960 Committed r147751: <http://trac.webkit.org/changeset/147751>
All reviewed patches have been landed. Closing bug.