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

ID: Q115529

1.00 WINDOWS kbtool kbfixlist kbbuglist

The information in this article applies to:

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:

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 <windows.h>
   #include <windowsx.h>
   #include <string.h>

   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 kbbuglist kbfixlist
Version           : 1.00
Platform          : WINDOWS
Solution Type     : kbfix

Last Reviewed: September 22, 1997