BUG: Fatal Error C1001 Line 585 w/ Pointer to Member FunctionLast reviewed: July 18, 1997Article ID: Q131323 |
1.00 1.50 1.51 1.52
WINDOWS NT
kbtool kbbuglist
The information in this article applies to:
SYMPTOMSWhen compiling a file, you may receive the following error:
fatal error C1001: internal compiler error (compiler file 'msc1.cpp', line 585).This occurs when you compile a file that meet both of these conditions:
error C2064: term does not evaluate to a function. RESOLUTIONEither use the /vmb (Best-case always) C++ compiler option instead of /vmg, or if you must use the /vmg (General-purpose always) option, use it with /vms (single inheritance) or /vmm (multiple inheritance).
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATIONIf you specify the /vmb (Best-case always) C++ compiler option (the default), the compiler uses the smallest possible representation of each pointer and generates the smallest amount of code required to operate on the pointer for each kind of inheritance. If you specify the /vmg (General-purpose always) option, the default inheritance model of the classes will be virtual inheritance (/vmv). To specify other inheritance models, use /vms (single inheritance) or /vmm (multiple inheritance) in addition to the /vmg option. The following sample is a valid code fragment, and should not generate C2064 or C1001, but it does if you use the /vmg compiler option.
Sample Code to Demonstrate Problem
/* Compile options needed: /vmg */class b { public: void (b::*bptr)(void); void one(void);};
void b::one(void) { (this->*bptr)(); // This line causes the C1001 error.}
REFERENCESFor more information, please see the following article in the Microsoft Knowledge Base: ARTICLE-ID: Q126844 TITLE : BUG: C1001 ICE If Compiling MFC Applications with /vmg Option |
Additional reference words: 1.50 1.00 8.00 8.00c no32bit noupdate
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |