Created On:  15 October 2010


A project (unmanaged C ) is being compiled for both "Error Detection and coverage Analysis". All other settings are default.  During the build, this error is received:

C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\xstring(426) : fatal error C1001: An internal error has occurred in the compiler. 

Investigating the build output more in depth, this error appeared to be the main issue:

Error NM2002: Inline expansion (/Ob) used during instrumentation
Instrumentation of XXX.cpp failed.


The issue is with optimizations.  In using optimizations, the compiler compresses code, uses shortcuts, etc. that won't let Error Detection(ED)  inject into the process.  The net result of this is that Error Detection will report less and less data on your application.  It is just not recommended to use optimized code against ED.  Thus ED does not work with inlining.  In your project properties (C/C -> optimization), if a /Ob1 or /Ob2 is specified, then the detailed error message is displayed. You need to switch to /Ob0. 
Incident #2469686