Microsoft KB Archive/123803

= FIX: Fatal Error C1001: Compiler File MSC1.CPP Line 1056 =

Article ID: 123803

Article Last Modified on 7/5/2005

-

APPLIES TO


 * Microsoft Visual C++ 2.0 Professional Edition

-



This article was previously published under Q123803



SYMPTOMS
When compiling the Sample Code below, the compiler gives the following fatal error message:

  test.cpp(14) : fatal error C1001: INTERNAL COMPILER ERROR (compiler file 'msc1.cpp', line 1056) Please choose the Technical Support command on the Visual C++ Help menu, or open the Technical Support help file for more information



RESOLUTION
See the workaround embedded in the Sample Code section of this article.



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



MORE INFORMATION
The sample code below can be used to reproduce the compiler error.

Sample Code to Reproduce Problem
/* Compile options needed: none template  class genvec3d { }; template  ostream& operator<< (ostream& o, const genvec3d& p) { return o; } class ray {  public: genvec3d origin; ray{} friend int operator<<(ostream& o, ray& r) /* The following line causes compiler Error */ { o << origin; return 1; }
 * 1) include 
 * 1) include 

/* To work around the problem, change the line above into a comment and change the following line to an executed line of code. */            /*  { o << r.origin; return 1; }  */ };

Additional query words: 9.00 2.00

Keywords: kbbug kbfix kbcpponly kbcompiler KB123803

-

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

© Microsoft Corporation. All rights reserved.