BUG: C1001: grammar.c, line 179, 180, or 192

Last reviewed: July 17, 1997
Article ID: Q87527
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

The following error

   fatal error C1001: INTERNAL COMPILER ERROR
       (compiler file '@(#)grammar.c:1.147, line 179)

is produced by Microsoft C/C++ version 7.0 when the following conditions are all true:
  • The source is compiled with /Oi
  • One of the intrinsic functions is not prototyped
  • A non-pointer value is passed as an argument to that intrinsic function where a pointer is expected

Microsoft C/C++ compiler versions 8.0 and 8.0c generate the following errors:

   fatal error C1001: INTERNAL COMPILER ERROR
       (compiler file '@(#)grammar.c:1.147, line 180)

   fatal error C1001: internal compiler error
       (compiler file '@(#)grammar.c:1.147, line 192)

RESOLUTION

Include the prototype for the function. The compiler will then flag the error as

   C2172: 'function': actual parameter is not a pointer

The program will compile without error once the parameter is corrected.

STATUS

Microsoft has confirmed this to be a bug in the products listed at the beginning of this article. We are researching this bug 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

Sample Code

/* Compile options needed: /Oi
*/

/* // Remove the comment from this section to cause the C2172 error
#include <memory.h>
*/

struct s {
     char a, b, c;
};

void func( void );

void func( void )
{
   struct s x;

   memset( x, 0, 5 ); // The correct code is:
                      //    memset( &x, 0, 5);
}


Additional reference words: 7.00 8.00 8.00c 1.00 1.50
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.