1

I am trying to run a VC++ 6 project in VS2010. In that am getting:

Internal Compiler error.. error C1001

Can anyone please tell me how to rectify that error? I Googled for this and I found reinstalling the Service Pack will solve this issue. But it didn't.

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
user670573
  • 13
  • 1
  • 3
  • Not really sure how we're supposed to help you fix this: you forgot to post the code! – Cody Gray - on strike May 16 '11 at 12:51
  • I was also getting this error and sent a message to MS. Today they responded that they have fixed it: See if this link explains the same problem you are having: https://developercommunity.visualstudio.com/content/problem/926865/wdmh-internal-compiler-error-with-code-analysis.html?childToView=975443#comment-975443 – Aabbee Apr 02 '20 at 23:52

2 Answers2

5

Microsoft Developer Network suggests that you remove some optimizations in your code: Fatal Error C1001. Once you've worked out which optimization is causing the issue, you can use a #pragma to disable that optimization in just that area:

// Disable the optimization
#pragma optimize( "", off )
...
// Re-enable any previous optimization
#pragma optimize( "", on )

Hope that helps to solve your problem.

icabod
  • 6,992
  • 25
  • 41
2

In order for me to resolve this issue while targeting DotNet 3.5 I had to apply the visual studio 2008 sp1 as well as a seemingly unrelated hotfix http://support.microsoft.com/kb/976656 that cleared it up. Keep in mind that the IDE is Visual studio but the msbuild is from your installed Visual studio 2008

Aaron Fischer
  • 20,853
  • 18
  • 75
  • 116