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

Last reviewed: September 18, 1997
Article ID: 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 <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 : CLIss kb16bitonly kbbuglist kbfixlist kbtool
Version : 1.00
Platform : WINDOWS
Solution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 18, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.