ID: Q116440
1.50 WINDOWS kbtool kbfixlist kbbuglist
The information in this article applies to:
- Microsoft Visual C++ for Windows, version 1.5
Compiling the sample code shown below with /Oe and /Oi optimizations causes the compiler to generate one of the following error messages:
warning C4713: Scroll: internal compiler error; restarting
( compiler file '@(#) grammar.c:1.147', line 168 )
If both /Oe (global register allocation) and /Oi (intrinsic function generation) are used, and the compiler finds an expression too complicated for this optimization, the compiler fails to generate the optimized code. However, the compiler is able to detect the problem at a point where it can restart the code-generation process and not optimize the function where the error was detected.
This is just a warning; the resulting code should be correct.
To eliminate the warning message, do one of the following:
-or-
-or-
Microsoft has confirmed this to be a problem in the Microsoft products listed above. This is not a problem in Visual C++, 32-bit Edition. This problem was corrected in Visual C++ version 2.0.
You can use the following sample code to demonstrate this problem:
/* Compile options needed: /Oe /Oi
*/
#include <string.h>
short NRow, NCol, BRow;
short ScrnMem[80];
/* Uncomment this line to work around the problem */
/* #pragma optimize( "ei", off ) */
void Scroll(short nlines)
{
if ( nlines != 0 )
memset(&ScrnMem[NRow*NCol], 0, (NRow-
BRow)*NCol*sizeof(ScrnMem[0]));
}
/* Uncomment this line to work around the problem */
/* #pragma optimize( " ", on ) */
Additional reference words: 1.50 8.00c
KBCategory: kbtool kbfixlist kbbuglist
KBSubcategory: CLIss
Keywords : kb16bitonly kbCompiler kbbuglist kbfixlist
Version : 1.50
Platform : WINDOWS
Solution Type : kbfix
Last Reviewed: September 22, 1997