Summary: | Disable MSVC warning 4288 | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Dumitru Daniliuc <dumi> | ||||
Component: | New Bugs | Assignee: | Dumitru Daniliuc <dumi> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | andersca, aroben | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Dumitru Daniliuc
2010-07-07 14:51:50 PDT
Created attachment 60785 [details]
patch
Comment on attachment 60785 [details] patch > + MSVC has a non-standard extension (/Ze /Zc:forScope-) that allows > + variables declared in for-loops to remain visible in the same > + scope even after the for-loop > + (http://msdn.microsoft.com/en-us/library/bk5hc10s.aspx). When this > + extension is enabled, re-declaring the same variable in that scope > + results in a C4288 warning. > + > + At the same time, there seems to be a bug in VS2005 that > + erroneously enables /Zc:forScope- even when that option is not > + specified > + (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 (In reply to comment #2) > (From update of attachment 60785 [details]) > > + MSVC has a non-standard extension (/Ze /Zc:forScope-) that allows > > + variables declared in for-loops to remain visible in the same > > + scope even after the for-loop > > + (http://msdn.microsoft.com/en-us/library/bk5hc10s.aspx). When this > > + extension is enabled, re-declaring the same variable in that scope > > + results in a C4288 warning. > > + > > + At the same time, there seems to be a bug in VS2005 that > > + erroneously enables /Zc:forScope- even when that option is not > > + specified > > + (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. 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. |