Visual Studio and .NET Framework Home
Optimization key (/O2) is not applied
12/22/2008 4:33:33 AM
User(s) can reproduce this bug
Optimization key (/O2) is not applied unless user explicitly change Optimization property of C++ project to the "Maximum speed (O2)".
Visual Studio 2008 SP1
Windows XP Professional
Operating System Language
Steps to Reproduce
1. Open solution attached
2. Select Release configuration in the Configuration Manager
3. Select app2 project in the Solution Explorer
4. Open app2 Properties Pages
5. Open Configuration Proeprties->Command line
There is no /O2 specified
/O2 key is enabled
TAP Code (if applicable)
You can indicate your satisfaction with how Microsoft handled this issue by completing this quick
3 question survey
to post a comment.
Please enter a comment.
on 3/9/2009 at 6:58 PM
We verified that with our current builds of VS 2010, we correctly pass the /O2 switch to the compiler! Thanks for the bug report!
Lead Software Design Engineer
Microsoft Visual Studio Platform Development
on 3/4/2009 at 6:55 PM
Thank you for the attachment and for the clarification. I didn't notice your comment about the fact that the IDE shows you incorrectly /O2 in the property pages.
I reactivated the bug and we're investigating a fix for the next release.
Note that my previous suggestion of setting /O2 manually still stands as a workaround for this bug.
Visual C++ IDE
on 1/29/2009 at 3:27 PM
If application is inconvenient, you have change design. User is target, application is not target.
on 1/11/2009 at 8:51 AM
Please check files attached.
on 1/10/2009 at 12:32 PM
Please read the description carefully and check solution attached. Maximum speed /O2 is selected on the C/C++ Compiler > Optimization page. But it is not applied.
I will provide you with a screenshot tomorrow.
on 1/10/2009 at 1:42 AM
This is expected as long as the optimization property is not set for the Release configuration. To solve this:
- right click on the project and select Properties
- in the Property Pages window, ensure that Configuration = Release
- go to C/C++ Compiler > Optimization page
- set Optimization = Maximize Speed (/O2).
Hope this helps.
Visual C++ IDE
on 12/22/2008 at 6:22 PM
Thanks for your feedback.
We are escalating 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.
Visual Studio Product Team
to post a workaround.
Please enter a workaround.
© 2014 Microsoft