Microsoft KB Archive/131013

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

Article ID: 131013

Article Last Modified on 7/5/2005

-

APPLIES TO


 * Microsoft Visual C++ 2.0 Professional Edition
 * Microsoft Visual C++ 2.1

-



This article was previously published under Q131013



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.



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 query words: 2.00 2.10 9.0 9.00 9.1 9.10

Keywords: kbbug kbfix KB131013

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.