<?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>34804</bug_id>
          
          <creation_ts>2010-02-10 09:49:21 -0800</creation_ts>
          <short_desc>Some WTF headers fail to compile under VS2008 and newer</short_desc>
          <delta_ts>2022-02-11 13:59:41 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Template Framework</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar, PlatformOnly</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>53445</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Adam Roben (:aroben)">aroben</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>darin</cc>
    
    <cc>evgenilv</cc>
    
    <cc>sfalken</cc>
    
    <cc>victor.bonnedun</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>189391</commentid>
    <comment_count>0</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2010-02-10 09:49:21 -0800</bug_when>
    <thetext>PassRefPtr.h fails to compile under VS2010 RC. This line:

friend PassRefPtr adoptRef&lt;T&gt;(T*);

generates a C4396 error: &quot;the inline specifier cannot be used when a friend declaration refers to a specialization of a function template&quot;. See http://msdn.microsoft.com/en-us/library/bb384968.aspx for more details.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>189392</commentid>
    <comment_count>1</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2010-02-10 09:50:07 -0800</bug_when>
    <thetext>Sorry, that&apos;s a warning, not an error.

We should probably just disable this warning in common.vsprops.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>189393</commentid>
    <comment_count>2</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2010-02-10 09:53:23 -0800</bug_when>
    <thetext>I think this warning also affects VS2008.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>189600</commentid>
    <comment_count>3</comment_count>
    <who name="Eugene Lavrenov">evgenilv</who>
    <bug_when>2010-02-10 21:14:36 -0800</bug_when>
    <thetext>Hi, I just submitted a patch for this. See bug 34828. There are actually three files in JavaScriptCore project, which are affected. I managed to build it with VS2008. Safari works fine.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>189602</commentid>
    <comment_count>4</comment_count>
    <who name="Eugene Lavrenov">evgenilv</who>
    <bug_when>2010-02-10 21:51:52 -0800</bug_when>
    <thetext>I do not think you should disable this warning in common.vsprops because accordingly to Microsoft: &quot;The compiler issues warning C4396 and IGNORES THE INLINE SPECIFIER.&quot; http://msdn.microsoft.com/en-us/library/bb384968.aspx
I am pretty sure that VS2005 compiler as well as many others also ignored inline specifier in that particular case, but without warning. :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>189675</commentid>
    <comment_count>5</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2010-02-11 07:23:43 -0800</bug_when>
    <thetext>*** Bug 34828 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>189676</commentid>
    <comment_count>6</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2010-02-11 07:25:01 -0800</bug_when>
    <thetext>As described in bug 34828, this affects a few other WTF headers.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>256076</commentid>
    <comment_count>7</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2010-07-26 09:51:02 -0700</bug_when>
    <thetext>&lt;rdar://problem/8234558&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>256095</commentid>
    <comment_count>8</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2010-07-26 10:38:20 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; I do not think you should disable this warning in common.vsprops because accordingly to Microsoft: &quot;The compiler issues warning C4396 and IGNORES THE INLINE SPECIFIER.&quot; http://msdn.microsoft.com/en-us/library/bb384968.aspx
&gt; I am pretty sure that VS2005 compiler as well as many others also ignored inline specifier in that particular case, but without warning. :)

I think the way to make a decision here is roughly:

* Does any compiler honor the inline specifier on adoptRef?
   * No: we should just remove it
   * Yes:
      * Does removing the inline specifier have any negative effects for those compilers which honor it?
         * No: we should just remove it
         * Yes: we should ignore the warning</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>833991</commentid>
    <comment_count>9</comment_count>
      <attachid>188561</attachid>
    <who name="Victor Bonnedun">victor.bonnedun</who>
    <bug_when>2013-02-15 07:05:20 -0800</bug_when>
    <thetext>Created attachment 188561
Patch proposed for removing inline statement in order to compile under VS2008</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>833992</commentid>
    <comment_count>10</comment_count>
    <who name="Victor Bonnedun">victor.bonnedun</who>
    <bug_when>2013-02-15 07:09:08 -0800</bug_when>
    <thetext>(In reply to comment #8)
&gt; (In reply to comment #4)
&gt; &gt; I do not think you should disable this warning in common.vsprops because accordingly to Microsoft: &quot;The compiler issues warning C4396 and IGNORES THE INLINE SPECIFIER.&quot; http://msdn.microsoft.com/en-us/library/bb384968.aspx
&gt; &gt; I am pretty sure that VS2005 compiler as well as many others also ignored inline specifier in that particular case, but without warning. :)
&gt; 
&gt; I think the way to make a decision here is roughly:
&gt; 
&gt; * Does any compiler honor the inline specifier on adoptRef?
&gt;    * No: we should just remove it
&gt;    * Yes:
&gt;       * Does removing the inline specifier have any negative effects for those compilers which honor it?
&gt;          * No: we should just remove it
&gt;          * Yes: we should ignore the warning

Hello,

Any news about this problem ?

I am currently trying to compile webkit using VS2008 and I encountered this issue.
As mentionned in Bug 34828, there are 3 inline statements that should be removed in order to compile under VS2008 (I submitted a patch).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>834039</commentid>
    <comment_count>11</comment_count>
      <attachid>188575</attachid>
    <who name="Victor Bonnedun">victor.bonnedun</who>
    <bug_when>2013-02-15 08:08:32 -0800</bug_when>
    <thetext>Created attachment 188575
Patch proposed for removing inline statement in order to compile under VS2008 (updated)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>834113</commentid>
    <comment_count>12</comment_count>
      <attachid>188575</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2013-02-15 09:44:56 -0800</bug_when>
    <thetext>Comment on attachment 188575
Patch proposed for removing inline statement in order to compile under VS2008 (updated)

View in context: https://bugs.webkit.org/attachment.cgi?id=188575&amp;action=review

Patch is incorrect, at least for non-Microsoft compilers, has no change log, and also does not apply successfully.

&gt; JavaScriptCore/heap/PassWeak.h:162
&gt; -template&lt;typename T&gt; PassWeak&lt;T&gt; inline adoptWeak(WeakImpl* impl)
&gt; +template&lt;typename T&gt; PassWeak&lt;T&gt; adoptWeak(WeakImpl* impl)

This is an unacceptable change for other compilers. The inline keyword tells the compiler to inline this function. Not sure why Microsoft’s compiler is having a problem with this, but please don’t punish all others for this mistake.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>834115</commentid>
    <comment_count>13</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2013-02-15 09:46:34 -0800</bug_when>
    <thetext>Sorry, I see now that others suggest that perhaps all the compilers are ignoring this inline unless inline was specified in the friend declaration. To make this change we need to get data on that. Adam Roben described the research that needs to be done. If someone does that research then we can make the appropriate change.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>188561</attachid>
            <date>2013-02-15 07:05:20 -0800</date>
            <delta_ts>2013-02-15 08:08:32 -0800</delta_ts>
            <desc>Patch proposed for removing inline statement in order to compile under VS2008</desc>
            <filename>remove_inline_VS2008.patch</filename>
            <type>text/plain</type>
            <size>1273</size>
            <attacher name="Victor Bonnedun">victor.bonnedun</attacher>
            
              <data encoding="base64">SW5kZXg6IEhhc2hTZXQuaA0KPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KLS0tIEhhc2hTZXQuaAkocmV2aXNpb24gMTQy
OTkxKQ0KKysrIEhhc2hTZXQuaAkod29ya2luZyBjb3B5KQ0KQEAgLTIxOSw3ICsyMTksNyBAQA0K
ICAgICB9CiAKICAgICB0ZW1wbGF0ZTx0eXBlbmFtZSBULCB0eXBlbmFtZSBVLCB0eXBlbmFtZSBW
PgotICAgIGlubGluZSB2b2lkIGRlbGV0ZUFsbFZhbHVlcyhjb25zdCBIYXNoU2V0PFQsIFUsIFY+
JiBjb2xsZWN0aW9uKQorICAgIHZvaWQgZGVsZXRlQWxsVmFsdWVzKGNvbnN0IEhhc2hTZXQ8VCwg
VSwgVj4mIGNvbGxlY3Rpb24pCiAgICAgewogICAgICAgICBkZWxldGVBbGxWYWx1ZXM8dHlwZW5h
bWUgSGFzaFNldDxULCBVLCBWPjo6VmFsdWVUeXBlPihjb2xsZWN0aW9uLm1faW1wbCk7CiAgICAg
fQpJbmRleDogT3duUHRyQ29tbW9uLmgNCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCi0tLSBPd25QdHJDb21tb24uaAko
cmV2aXNpb24gMTQyOTkxKQ0KKysrIE93blB0ckNvbW1vbi5oCSh3b3JraW5nIGNvcHkpDQpAQCAt
NTYsNyArNTYsNyBAQA0KIAogbmFtZXNwYWNlIFdURiB7CiAKLSAgICB0ZW1wbGF0ZSA8dHlwZW5h
bWUgVD4gaW5saW5lIHZvaWQgZGVsZXRlT3duZWRQdHIoVCogcHRyKQorICAgIHRlbXBsYXRlIDx0
eXBlbmFtZSBUPiB2b2lkIGRlbGV0ZU93bmVkUHRyKFQqIHB0cikKICAgICB7CiAgICAgICAgIHR5
cGVkZWYgY2hhciBrbm93bltzaXplb2YoVCkgPyAxIDogLTFdOwogICAgICAgICBpZiAoc2l6ZW9m
KGtub3duKSkKSW5kZXg6IFBhc3NSZWZQdHIuaA0KPT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KLS0tIFBhc3NSZWZQdHIu
aAkocmV2aXNpb24gMTQyOTkxKQ0KKysrIFBhc3NSZWZQdHIuaAkod29ya2luZyBjb3B5KQ0KQEAg
LTE1Nyw3ICsxNTcsNyBAQA0KICAgICAgICAgcmV0dXJuIGEgIT0gYi5nZXQoKTsgCiAgICAgfQog
ICAgIAotICAgIHRlbXBsYXRlPHR5cGVuYW1lIFQ+IGlubGluZSBQYXNzUmVmUHRyPFQ+IGFkb3B0
UmVmKFQqIHApCisgICAgdGVtcGxhdGU8dHlwZW5hbWUgVD4gUGFzc1JlZlB0cjxUPiBhZG9wdFJl
ZihUKiBwKQogICAgIHsKICAgICAgICAgYWRvcHRlZChwKTsKICAgICAgICAgcmV0dXJuIFBhc3NS
ZWZQdHI8VD4ocCwgdHJ1ZSk7Cg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>188575</attachid>
            <date>2013-02-15 08:08:32 -0800</date>
            <delta_ts>2013-02-15 09:44:56 -0800</delta_ts>
            <desc>Patch proposed for removing inline statement in order to compile under VS2008 (updated)</desc>
            <filename>remove_inline_VS2008.patch</filename>
            <type>text/plain</type>
            <size>2941</size>
            <attacher name="Victor Bonnedun">victor.bonnedun</attacher>
            
              <data encoding="base64">SW5kZXg6IEphdmFTY3Jp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Brbm93bltzaXplb2YoVCkgPyAxIDogLTFdOwogICAgICAgICBpZiAoc2l6ZW9mKGtub3duKSkK
SW5kZXg6IFdURi93dGYvUGFzc1JlZlB0ci5oDQo9PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQotLS0gV1RGL3d0Zi9QYXNz
UmVmUHRyLmgJKHJldmlzaW9uIDE0Mjk5MSkNCisrKyBXVEYvd3RmL1Bhc3NSZWZQdHIuaAkod29y
a2luZyBjb3B5KQ0KQEAgLTE1Nyw3ICsxNTcsNyBAQA0KICAgICAgICAgcmV0dXJuIGEgIT0gYi5n
ZXQoKTsgCiAgICAgfQogICAgIAotICAgIHRlbXBsYXRlPHR5cGVuYW1lIFQ+IGlubGluZSBQYXNz
UmVmUHRyPFQ+IGFkb3B0UmVmKFQqIHApCisgICAgdGVtcGxhdGU8dHlwZW5hbWUgVD4gUGFzc1Jl
ZlB0cjxUPiBhZG9wdFJlZihUKiBwKQogICAgIHsKICAgICAgICAgYWRvcHRlZChwKTsKICAgICAg
ICAgcmV0dXJuIFBhc3NSZWZQdHI8VD4ocCwgdHJ1ZSk7Cg==
</data>
<flag name="review"
          id="208726"
          type_id="1"
          status="-"
          setter="darin"
    />
          </attachment>
      

    </bug>

</bugzilla>