FIX: Fatal Error C1001 'd:\b_bld\c2.m2\P2\main.c', line 374

Last reviewed: September 18, 1997
Article ID: Q131013
2.00 2.10 WINDOWS NT kbtool kbfixlist

The information in this article applies to:

  • The Microsoft C/C++ Compiler (CL.EXE) included with: Microsoft Visual C++, 32-bit Edition, versions 2.0 and 2.1

SYMPTOMS

An attempt to compile code that defines the exception handling mechanism in a function that takes a class argument by value, causes the compiler to generate the following error message:

   bug.cxx(19) : fatal error C1001: INTERNAL COMPILER ERROR
   (compiler file 'd:\b_bld\c2.m2\P2\main.c', line 374)

RESOLUTION

Pass class A by reference instead of by value in the Func call in the sample code in this article.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug was corrected in Microsoft Visual C++, 32-bit Edition, version 4.0.

MORE INFORMATION

Sample Code to Reproduce Problem

/* Compile options needed: -GX
    bug.cpp
*/

class A { public:
    A();
   ~A();
};

int Func(A)
//To work around the problem, replace the previous with the line below.
//int Func (A&)   // Change this line from a comment to executed code
{
    try
    {
        return (1);
    }
    catch   (int i)
    {
        return (i);
    }
    ;
}


Additional reference words: 2.00 2.10 9.0 9.00 9.1 9.10
KBCategory: kbtool kbfixlist kbbuglist
KBSubcategory: CLIss
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.