Microsoft KB Archive/315490

= FIX: &quot;C1001 Internal Compiler&quot; Error Message When You Compile Code with Typename Identifier =

Article ID: 315490

Article Last Modified on 4/11/2003

-

APPLIES TO


 * Microsoft Visual C++ .NET 2002 Standard Edition

-



This article was previously published under Q315490



SYMPTOMS
When you try to compile the sample code fragment from the &quot;More Information&quot; section of this article, you receive the following compiler error message:

t.cpp(16) : fatal error C1001: INTERNAL COMPILER ERROR

(compiler file 'msc1.cpp', line 2844)



CAUSE
This behavior occurs if a template class contains a derived member method as a typename identifier. The compiler error message occurs only when you compile the code in a Managed C++ project. You do not receive this error message when you use a native code compiler.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. This bug was corrected in Microsoft Visual C++ .NET (2003).



Steps to Reproduce the Problem
  Create a new Managed C++ application, and then replace the default code with the following:
 * 1) include &quot;stdafx.h&quot;

class A { public: void FA; int i; };

class B : public A { public: virtual void FB; int k; };

template  class CLockFunc0 { public: CLockFunc0 : m_pF(pF) {} ~CLockFunc0 {} private: F m_pF; };

CLockFunc0 t1;  Compile the program. You receive the error message described in the &quot;Symptoms&quot; section of this article.

Additional query words: ICE

Keywords: kberrmsg kbbug kbfix kbpending kbcompiler kbmanaged KB315490

-

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

© Microsoft Corporation. All rights reserved.