Microsoft KB Archive/115529

{|
 * width="100%"|

FIX: C4713: Internal Compiler Error, File reg86.c, line 2934

 * }

Q115529

1.00 WINDOWS kbtool kbfixlist kbbuglist -- The information in this article applies to: - The Microsoft C/C++ Compiler (CL.EXE), included with: - Microsoft Visual C++ for Windows, version 1.0 -- SYMPTOMS ======== The use of global register allocation by the optimizing compiler in the sample code (in the "MORE INFORMATION" section, below) generates the following warning message and prevents the compiler from creating an object module: test.c(16) : warning C4713: GetDlgFields: internal compiler error restarting (compiler file '@(#)reg86.c:1.26', line 2934) RESOLUTION ========== There are three workarounds to this problem: - Use the fast compiler option, /f. -or- - Remove the /Oe compiler option to disable global register allocation by the optimizing compiler. -or- - Use the optimize pragma to disable optimization during the function where the error occurs: #pragma optimize("",off) void test_func(void) { /* ... */ } #pragma optimize("",on) STATUS ====== Microsoft has confirmed this to be a problem in the Microsoft products listed above. This problem was corrected in Visual C++ version 1.5. MORE INFORMATION ================ The following sample code demonstrates this problem: Sample Code --- /* Compile options needed: /Oe /c */ #include #include #include BOOL GetDlgFields (HWND hwnd, char *npRec) { int i, iLeft = 256, iLen; for (i = 0; i < 5; i++) { iLen = Edit_GetLine (hwnd, i, npRec, iLeft); if (strstr (npRec, "\r\n")) iLen -= 2; npRec += iLen; *npRec = '\t'; iLeft -= ++iLen; ++npRec; } return TRUE; } Additional reference words: 1.00 8.00 KBCategory: kbtool kbfixlist kbbuglist KBSubcategory: CLIss

Keywords : kb16bitonly kbCompiler

Issue type :

Technology : kbVCsearch kbAudDeveloper kbCVCComp