<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>176869</bug_id>
          
          <creation_ts>2017-09-13 11:51:09 -0700</creation_ts>
          <short_desc>Unified JSC build triggers -Wsubobject-linkage warning</short_desc>
          <delta_ts>2017-09-13 20:45:01 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>Other</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>176876</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Catanzaro">mcatanzaro</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>keith_miller</cc>
    
    <cc>mcatanzaro</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1348414</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2017-09-13 11:51:09 -0700</bug_when>
    <thetext>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&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1348624</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2017-09-13 20:45:01 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 176876 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>