BUG: Warning C4713: grammar.c:1.147, Line 180, ++ in Fcn Call

Last reviewed: July 17, 1997
Article ID: Q102689
7.00 | 1.00 1.50 MS-DOS | WINDOWS kbtool kbbuglist

The information in this article applies to:

  • The Microsoft C/C++ Compiler (CL.EXE), included with:

        - Microsoft C/C++ for MS-DOS, versions 7.0
        - Microsoft Visual C++ for Windows, versions 1.0 and 1.5
    

SYMPTOMS

An attempt to compile code that uses the postincrement (++) operator in a function parameter list fails and Microsoft C/C++ generates one of the following messages. In Microsoft C/C++ version 8.0c:

   warning C4713: test: internal compiler error; restarting
                (compiler file '@(#)grammar.c:1.147', line 192)

In Microsoft C/C++ version 8.0:

   warning C4713: test: internal compiler error; restarting
      (compiler file '@(#)grammar.c:1.147', line 180)

In Microsoft C/C++ version 7.0:

   warning C4713: test: INTERNAL COMPILER ERROR; restarting
      (compiler file '@(#)grammar.c:1.147', line 179)
      Contact Microsoft Product Support Services

CAUSE

The warnings indicate that because the code could not be compiled successfully with the specified optimizations, the compiler restarted compilation with global optimizations disabled. The compiler generates correct code that uses only local optimizations.

RESOLUTION

Perform one of the following two steps to resolve these warnings:

  • Modify the compiler command line to remove the /Oe option switch.

    -or-

  • Modify the source code to move the autoincrement operator outside the function call.

STATUS

Microsoft has confirmed this to be a problem in Microsoft C/C++ versions 7.0, 8.0, and 8.0c for MS-DOS. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

This is not a problem in Visual C++ 32-bit Edition.

MORE INFORMATION

The following code example demonstrates this problem:

Sample Code

/*
 * Compiler options needed: /c /Oe
 */

void tryit(char _far *, int);

void test(void)
{
   char _far *ptr;

   switch (2)
      {
   case 2:
      tryit(ptr++, 1);
      ++ptr;
      break;
      }
}


Additional reference words: 1.00 1.50 7.00 8.00 8.00c
KBCategory: kbtool kbbuglist
KBSubcategory: CLIss
Keywords : kb16bitonly


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: July 17, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.