C++ compiler BUG with unsigned types in loops - by lkj23

Status : 

  Deferred<br /><br />
		The product team has reviewed this issue and has deferred it for consideration at a later time.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 777904 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 1/30/2013 9:44:13 AM
Access Restriction Public


C++ compiler in Visual Studio 2010 probably contains BUGs.
It produces incorrect code, if we use "unsigned" type in "for" loops and use -O2 optimization.
Sign in to post a comment.
Posted by Microsoft on 2/22/2013 at 1:51 PM
Thanks for reporting this bug. We have verified the bug and will release a fix in the future.

If you need a workaround for the VS 2010 compiler, you can turn off optimizations for the specific function using: #pragma optimize("", off) ... your_func() { ... } #pragma optimize("", on). If you need a hotfix for VS 2010, please visit the support site: http://support.microsoft.com/common/international.aspx?RDPATH=dm;en-us;selectassist&target=assistance

Rui Zhang
Microsoft Visual C++
Posted by Microsoft on 1/30/2013 at 6:57 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Microsoft on 1/30/2013 at 9:54 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)