FIX: C1001: Internal Compiler Error: msc2.cpp, Line 992

Last reviewed: September 18, 1997
Article ID: Q115323
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

Compiling source code that makes extensive use of pointers based on __self in conjunction with any of the /Ol, /Oe, or /Og compiler switches may cause the optimizing compiler to generate the following error message:

    fatal error C1001: internal compiler error
    (compiler file 'msc2.cpp', line 992)

The problem only occurs when the compiler is invoked from the MS-DOS command line outside of Windows. The problem does not occur when the compiler is invoked from the command line inside a Windows MS-DOS session.

RESOLUTION

To avoid the problem, do one of the following:

  • Upgrade to Visual C++ for Windows, version 1.5. This problem has been fixed with the version 8.0c compiler, supplied with Visual C++ for Windows, version 1.5.

    -or-

  • Do not use the /Ol, /Oe, or /Og optimizations. This can be accomplished at the module level by not specifying any of these switches and at the function level in the source code by using #pragma optimize directives to turn off the optimizations. To turn off the optimizations with a #pragma directive, place the following statement before the function containing the code that is causing the error:

           #pragma optimize ("leg", off)
    

    To turn the optimizations back on, place the following statement after the function:

           #pragma optimize ( "", on )
    

    -or-

  • Use the fast compiler because the problem only occurs when the optimizing compiler is used. You can use the fast compiler by activating the /f compiler switch.

    -or-

  • Use the compiler from within Windows because the problem only occurs when the compiler is invoked from the MS-DOS prompt outside of Windows.

STATUS

Microsoft has confirmed this to be a bug in the products listed above. This problem was corrected in Visual C++ for Windows, version 1.5.


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.