BUG: C1001 ICE If Compiling MFC Applications with /vmg OptionLast reviewed: July 22, 1997Article ID: Q126844 |
1.00 1.50 1.51 1.52
WINDOWS
kbtool kbbuglist
The information in this article applies to:
SYMPTOMSCompiling an MFC application with the /vmg compiler option may result in the following warning and fatal compiler error:
warning C4759: segment lost in conversion fatal error C1001: INTERNAL COMPILER ERROR ( compiler file 'gencode.c', line 408 ) CAUSEEach entry in an MFC message map specifies a member function to be called in response to a certain message. To accomplish this, the message map facility uses pointers to member functions. Depending on the inheritance model used by each class, the compiler represents pointers to member functions differently. You can specify the way in which the compiler will represent pointers to member functions with the /vmb (Best-case always) and the /vmg (General-purpose always) C++ compiler options. If you specify the /vmg (General-purpose always) option, and specify any inheritance model other than /vms (for single inheritance), the C1001 error will result.
RESOLUTION
STATUSMicrosoft has confirmed this to be a bug in the Microsoft 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 INFORMATIONIf you specify the /vmb (Best-case always) C++ compiler option, which is the default, the compiler uses the smallest possible representation of each pointer, and will generate 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, you must also specify an option to indicate the inheritance model of the classes. This can be one of three options: /vms (single inheritance), /vmm (multiple inheritance) or /vmv (virtual inheritance or point to any class). The default general-purpose representation is /vmv. In other words, specifying /vmg by itself indicates to the compiler that you are using the /vmv representation. This will result in the C1001 error.
|
Additional reference words: 8.00 8.00c 1.00 1.50 1.51 1.52
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |