Introduction
The hotfix that this article describes fixes the following issues in Microsoft Visual Studio 2010.
Issue 1
You experience unexpected behavior when you run an application that has loops in the source code. This issue occurs if the source code is compiled with global optimization (/Og) enabled.
Issue 2
Consider the following scenario:
-
You have a Visual C++ project that includes the Atlcomcli.h file.
-
You specify the /J compiler option to define the_CHAR_UNSIGNEDmacro in the project.
-
You compile the project.
In this scenario, you receive one of the following error messages:
-
error C2338: CVarTypeInfo<char> cannot be compiled with /J or _CHAR_UNSIGNED flag enabled
-
error C2338: CVarTypeInfo<char*> cannot be compiled with /J or _CHAR_UNSIGNED flag enabled
Issue 3
An access violation occurs when you run a Visual C++ application that is built for an x86-based version of Windows. This problem occurs when the application has an expression tree that has two array-type input arguments.
Cause
Cause of Issue 1
This problem occurs because an incorrect loop optimization is executed. This causes incorrect code generation.
Cause of Issue 2
This problem occurs because static assertions in the Atlcomcli.h file are set to the /J option and the CHAR_UNSIGNED macro incorrectly.
Cause of Issue 3
This problem occurs because the arguments in push instructions are mixed up. Therefore, incorrect arguments are passed to push instructions.
More Information
Hotfix information
A supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that is described in this article. Apply it only to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Visual Studio 2010 that contains this hotfix.
To resolve this problem immediately, contact Microsoft Customer Support Services to obtain the hotfix. For a complete list of Microsoft Customer Support Services telephone numbers and information about support costs, visit the following Microsoft website:http://support.microsoft.com/contactus/?ws=supportNote In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.
Prerequisites
You must have Microsoft Visual Studio 2010 installed to apply this hotfix.
Restart requirement
You do not have to restart the computer after you apply the hotfix if no affected file is being used.
Hotfix replacement information
This hotfix does not replace any other hotfixes.
File information
The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
File name |
File version |
File size |
Date |
Time |
Platform |
---|---|---|---|---|---|
C2.dll |
16.0.30319.314 |
2,510,144 |
30-May-2010 |
20:48 |
x86 |
C2.dll |
16.0.30319.314 |
2,588,480 |
30-May-2010 |
20:48 |
x86 |
C2.dll |
16.0.30319.314 |
2,630,976 |
30-May-2010 |
20:48 |
x86 |
C2.dll |
16.0.30319.314 |
2,977,600 |
30-May-2010 |
20:48 |
x64 |
C2.dll |
16.0.30319.314 |
7,351,616 |
30-May-2010 |
20:48 |
IA-64 |
Workaround
Workaround for Issue 1
To work around this problem, disable the global optimization. For more information about how to disable the global optimization, click the following article number to view the article in the Microsoft Knowledge Base:
216181 FIX: Incorrect Code Generated with /Og Optimization
Workaround for Issue 2
To work around this problem, use the following pragma directive to include the Atlcomcli.h file.
#pragma push_macro("ATLSTATIC_ASSERT")
#undef ATLSTATIC_ASSERT #define ATLSTATIC_ASSERT(x,y) #include <atlcomcli.h> #undef ATLSTATIC_ASSERT #pragma pop_macro("ATLSTATIC_ASSERT")