Home Dashboard Directory Help
Search

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


Status: 

Closed
 as Deferred Help for as Deferred


1
0
Sign in
to vote
Type: Bug
ID: 777904
Opened: 1/30/2013 9:44:13 AM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

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.
Details
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

Thanks,
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)
Sign in to post a workaround.