[Webkit-unassigned] [Bug 176869] New: Unified JSC build triggers -Wsubobject-linkage warning
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Sep 13 11:51:09 PDT 2017
https://bugs.webkit.org/show_bug.cgi?id=176869
Bug ID: 176869
Summary: Unified JSC build triggers -Wsubobject-linkage warning
Product: WebKit
Version: Other
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: mcatanzaro at igalia.com
CC: keith_miller at apple.com
I see a couple new warnings after r221954:
[505/5235] Building CXX object Source/...s/JavaScriptCore/UnifiedSource44.cpp.o
In file included from DerivedSources/JavaScriptCore/UnifiedSource44.cpp:1:0:
../../Source/JavaScriptCore/dfg/DFGLICMPhase.cpp:64:7: warning: ‘JSC::DFG::LICMPhase’ has a field ‘JSC::DFG::LICMPhase::m_data’ whose type uses the anonymous namespace [-Wsubobject-linkage]
class LICMPhase : public Phase {
^~~~~~~~~
[507/5235] Building CXX object Source/...s/JavaScriptCore/UnifiedSource43.cpp.o
In file included from DerivedSources/JavaScriptCore/UnifiedSource43.cpp:2:0:
../../Source/JavaScriptCore/dfg/DFGIntegerCheckCombiningPhase.cpp:174:7: warning: ‘JSC::DFG::IntegerCheckCombiningPhase’ has a field ‘JSC::DFG::IntegerCheckCombiningPhase::m_map’ whose type uses the anonymous namespace [-Wsubobject-linkage]
class IntegerCheckCombiningPhase : public Phase {
^~~~~~~~~~~~~~~~~~~~~~~~~~
Fix would be to move those two types into the anonymous namespace as well, according to gcc(1):
-Wsubobject-linkage (C++ and Objective-C++ only)
Warn if a class type has a base or a field whose type uses the
anonymous namespace or depends on a type with no linkage. If a
type A depends on a type B with no or internal linkage, defining it
in multiple translation units would be an ODR violation because the
meaning of B is different in each translation unit. If A only
appears in a single translation unit, the best way to silence the
warning is to give it internal linkage by putting it in an
anonymous namespace as well. The compiler doesn't give this
warning for types defined in the main .C file, as those are
unlikely to have multiple definitions. -Wsubobject-linkage is
enabled by default.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170913/30e5a2e0/attachment.html>
More information about the webkit-unassigned
mailing list