FIX: Fatal Error C1001: getattr.c, Line 179
PSS ID Number: Q111644
Article last modified on 03-22-1994

7.00   | 7.00

MS-DOS | WINDOWS


----------------------------------------------------------------------
The information in this article applies to:

 - Microsoft C/C++ compiler for MS-DOS, version 7.0
 - Microsoft C/C++ compiler for Windows, version 7.0
----------------------------------------------------------------------

SYMPTOMS
========

The Microsoft C/C++ compiler version 7.0 will generate an the following
internal compiler error when using the /Oi and /AH compiler options
together when attempting to compile a source file with a .CPP extension:

   file.cpp(6) : fatal error C1001: INTERNAL COMPILER ERROR
           (compiler file '@(#)getattr.c:1.89', line 179)
           Contact Microsoft Product Support Services

RESOLUTION
==========

Use any of the following techniques to work around this problem:

 - Compile the code without the /AH option switch.

   -or-

 - Compile the code without the /Oi switch.

   -or-

 - Use the #pragma function() in the source file causing the problem. For
   the sample code below, the pragma would be #pragma function(memset).
   This forces the compiler to use the function version of memset rather
   than the intrinsic version.

STATUS
======

Microsoft has confirmed this to be a problem in Microsoft C/C++ 7.0. This
problem was corrected in Visual C++ version 1.0.

MORE INFORMATION
================

Sample Code
-----------

/* Compile options needed: /c /AH /f- /Oi
   This file must have a .CPP extension */

#include <string.h>

void MyFunc (void)
{
     char *ptr;
     memset(ptr, '0', 0);
}

Additional reference words: 7.00 7.0a 7.00a ICE
KBCategory: Prg
KBSubcategory:

=============================================================================

Copyright Microsoft Corporation 1994.
