<?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>41804</bug_id>
          
          <creation_ts>2010-07-07 14:51:50 -0700</creation_ts>
          <short_desc>Disable MSVC warning 4288</short_desc>
          <delta_ts>2010-07-07 15:20:52 -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>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <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="Dumitru Daniliuc">dumi</reporter>
          <assigned_to name="Dumitru Daniliuc">dumi</assigned_to>
          <cc>andersca</cc>
    
    <cc>aroben</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>247780</commentid>
    <comment_count>0</comment_count>
    <who name="Dumitru Daniliuc">dumi</who>
    <bug_when>2010-07-07 14:51:50 -0700</bug_when>
    <thetext>MSVC has a non-standard extension (/Ze /Zc:forScope) that allows variables declared in for-loops to remain in the &quot;outer&quot; scope: http://msdn.microsoft.com/en-us/library/bk5hc10s.aspx. When the same variable is re-declared after the for-loop, the compiler issues warning C4288. There&apos;s also a bug in VS2005 that enables this extension even if the /Zc:forScope option wasn&apos;t specified: http://connect.microsoft.com/VisualStudio/feedback/details/338010/bogus-compiler-warning-c4288. Looks like we got hit by that bug, so we need to disable that warning.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>247789</commentid>
    <comment_count>1</comment_count>
      <attachid>60785</attachid>
    <who name="Dumitru Daniliuc">dumi</who>
    <bug_when>2010-07-07 15:05:22 -0700</bug_when>
    <thetext>Created attachment 60785
patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>247791</commentid>
    <comment_count>2</comment_count>
      <attachid>60785</attachid>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2010-07-07 15:08:37 -0700</bug_when>
    <thetext>Comment on attachment 60785
patch

&gt; +        MSVC has a non-standard extension (/Ze /Zc:forScope-) that allows
&gt; +        variables declared in for-loops to remain visible in the same
&gt; +        scope even after the for-loop
&gt; +        (http://msdn.microsoft.com/en-us/library/bk5hc10s.aspx). When this
&gt; +        extension is enabled, re-declaring the same variable in that scope
&gt; +        results in a C4288 warning.
&gt; +
&gt; +        At the same time, there seems to be a bug in VS2005 that
&gt; +        erroneously enables /Zc:forScope- even when that option is not
&gt; +        specified
&gt; +        (http://connect.microsoft.com/VisualStudio/feedback/details/338010/bogus-compiler-warning-c4288).

This makes it sound like the actual behavior gets enabled, not just the warning. Explaining in the previous paragraph that /Ze turns on the behavior and /Zc:forScope- turns on the warning could clear this up, as could changing the description in this paragraph.

Other than that, r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>247796</commentid>
    <comment_count>3</comment_count>
    <who name="Dumitru Daniliuc">dumi</who>
    <bug_when>2010-07-07 15:13:49 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 60785 [details])
&gt; &gt; +        MSVC has a non-standard extension (/Ze /Zc:forScope-) that allows
&gt; &gt; +        variables declared in for-loops to remain visible in the same
&gt; &gt; +        scope even after the for-loop
&gt; &gt; +        (http://msdn.microsoft.com/en-us/library/bk5hc10s.aspx). When this
&gt; &gt; +        extension is enabled, re-declaring the same variable in that scope
&gt; &gt; +        results in a C4288 warning.
&gt; &gt; +
&gt; &gt; +        At the same time, there seems to be a bug in VS2005 that
&gt; &gt; +        erroneously enables /Zc:forScope- even when that option is not
&gt; &gt; +        specified
&gt; &gt; +        (http://connect.microsoft.com/VisualStudio/feedback/details/338010/bogus-compiler-warning-c4288).
&gt; 
&gt; This makes it sound like the actual behavior gets enabled, not just the warning. Explaining in the previous paragraph that /Ze turns on the behavior and /Zc:forScope- turns on the warning could clear this up, as could changing the description in this paragraph.

done. made it more clear that /Ze enables all MSVC extensions and /Zc:forScope- tells the compiler to issue a warning when it sees the same variable declared in a for-loop and then re-declared in the same scope.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>247800</commentid>
    <comment_count>4</comment_count>
    <who name="Dumitru Daniliuc">dumi</who>
    <bug_when>2010-07-07 15:20:52 -0700</bug_when>
    <thetext>landed: r62708.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>60785</attachid>
            <date>2010-07-07 15:05:22 -0700</date>
            <delta_ts>2010-07-07 15:08:37 -0700</delta_ts>
            <desc>patch</desc>
            <filename>patch</filename>
            <type>text/plain</type>
            <size>3360</size>
            <attacher name="Dumitru Daniliuc">dumi</attacher>
            
              <data encoding="base64">SW5kZXg6IEphdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBKYXZhU2NyaXB0
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDYyNzA0KQorKysgSmF2YVNjcmlwdENvcmUvQ2hhbmdl
TG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xLDMgKzEsMTMgQEAKKzIwMTAtMDctMDcgIER1bWl0cnUg
RGFuaWxpdWMgIDxkdW1pQGNocm9taXVtLm9yZz4KKworICAgICAgICBSZXZpZXdlZCBieSBOT0JP
RFkgKE9PUFMhKS4KKworICAgICAgICBSZXZlcnQgcjYyNjg5LgorICAgICAgICBodHRwczovL2J1
Z3Mud2Via2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29tbW9uLnZzcHJvcHMJKHdvcmtpbmcgY29weSkKQEAgLTE1LDcgKzE1
LDcgQEAKIAkJV2FybmluZ0xldmVsPSI0IgogCQlXYXJuQXNFcnJvcj0idHJ1ZSIKIAkJRGVidWdJ
bmZvcm1hdGlvbkZvcm1hdD0iMyIKLQkJRGlzYWJsZVNwZWNpZmljV2FybmluZ3M9IjQwMTg7NDA2
ODs0MDk5OzQxMDA7NDEyNzs0MTM4OzQxODA7NDE4OTs0MjAxOzQyNDQ7NDI1MTs0Mjc1OzQyOTE7
NDMwNTs0MzQ0OzQzNTU7NDM4OTs0NTAzOzQ1MDU7NDUxMDs0NTEyOzQ2MTA7NDcwNjs0ODAwOzQ5
NTE7NDk1Mjs0OTk2OzYwMTE7NjAzMTs2MjExOzYyNDY7NjI1NTs2Mzg3IgorCQlEaXNhYmxlU3Bl
Y2lmaWNXYXJuaW5ncz0iNDAxODs0MDY4OzQwOTk7NDEwMDs0MTI3OzQxMzg7NDE4MDs0MTg5OzQy
MDE7NDI0NDs0MjUxOzQyNzU7NDI4ODs0MjkxOzQzMDU7NDM0NDs0MzU1OzQzODk7NDUwMzs0NTA1
OzQ1MTA7NDUxMjs0NjEwOzQ3MDY7NDgwMDs0OTUxOzQ5NTI7NDk5Njs2MDExOzYwMzE7NjIxMTs2
MjQ2OzYyNTU7NjM4NyIKIAkvPgogCTxUb29sCiAJCU5hbWU9IlZDTGlicmFyaWFuVG9vbCIK
</data>
<flag name="review"
          id="48547"
          type_id="1"
          status="+"
          setter="aroben"
    />
    <flag name="commit-queue"
          id="48548"
          type_id="3"
          status="-"
          setter="dumi"
    />
          </attachment>
      

    </bug>

</bugzilla>