Microsoft KB Archive/116442

= BUG: C1001 Generated Using typedef for Member Functions =

Article ID: 116442

Article Last Modified on 7/5/2005

-

APPLIES TO


 * Microsoft C/C++ Professional Development System 7.0
 * Microsoft Visual C++ 1.0 Professional Edition
 * Microsoft Visual C++ 1.5 Professional Edition
 * Microsoft Visual C++ 2.0 Professional Edition

-



This article was previously published under Q116442



SYMPTOMS
When you compile C++ code that uses a typedef for member functions:

 If the code is compiled with C/C++ Compiler for MS-DOS, version 8.0c, and you use the /Fr or /FR compiler option, the following error message is generated:

fatal error C1001: internal compiler error

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

 If the code is compiled with the C/C++ Compiler for Windows NT, version 8.0, and you use the /Fr or /FR compiler option, the following error message is generated:

fatal error C1001: INTERNAL COMPILER ERROR

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

Please choose the Technical Support command on the Visual Workbench Help menu, or open the Technical Support help file for more information

 If neither the /Fr or /FR option is used, the C/C++ Compiler for MS-DOS, version 8.0c, and the C/C++ Compiler for Windows NT, version 8.0, do not generate the C1001 error message; however, the member functions are not prototyped correctly. Regardless of the compiler option used, the C/C++ Compiler for MS-DOS, versions 7.0 and 8.0, do not generate the C1001 error; however, the member functions are not prototyped correctly.



RESOLUTION
To work around this problem, do one of the following:


 * Compile the code without the /Fr or /FR option. -or-


 * Prototype the functions without the typedef.



STATUS
Microsoft has confirmed this to be a bug in the products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.



MORE INFORMATION
You can use the following sample code to demonstrate this problem. If one of the workarounds is used, then the error message generated is:

error C2511: 'memberFunc' : overloaded member function not found in 'CClassName'

Sample Code
/* Compile options needed: /Fr or /FR

typedef void VOIDFUNC(void);

class CClassName {     VOIDFUNC memberFunc; };

void CClassName::memberFunc(void) {  }

Additional query words: 7.00 8.00 8.00c 9.00 1.00 1.50 2.00 noupdate

Keywords: kbbug kbcpponly kbcompiler KB116442

-

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

© Microsoft Corporation. All rights reserved.