BUG: C1001: Internal Compiler Error, msc1.cpp Using /ZiLast reviewed: July 22, 1997Article ID: Q115525 |
7.00 | 1.00 1.50
MS-DOS | WINDOWS
kbtool kbbuglist
The information in this article applies to:
SYMPTOMSUsing a typedef function pointer as a parameter to another function, as shown in the example below, may cause the compiler to generate the following error when the code is compiled using the /Zi option:
bug.c(13) : fatal error C1001: internal compiler error (compiler file 'msc1.cpp', line 581)The same code, compiled without the /Zi option, does not generate this error.
RESOLUTIONThe functions in the example below pass a user-defined function pointer. When the user-defined data type in the function parameter is replaced with the actual data type (in other words, do not use typedefs), the code compiles correctly. Also, in the case of the example below, reversing the order of the two function definitions also makes the code compile correctly.
STATUSMicrosoft has confirmed this to be a bug with the Microsoft products listed above. We are researching the problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATIONThe following sample code can be used to demonstrate the problem:
Sample Code
/* Compile options needed: /c */ typedef void _far _pascal MonIsrFnTy(void); /* Replacing the current Function1 definition with: */ /* static void _near Function1(void (_far _pascal */ /* _far * _far * IsrPPFn)(void)) */ /* will fix this problem. The same must be done with */ /* the definition for Function2 */ static void _near Function1(MonIsrFnTy _far * _far * IsrPPFn) { } static void _near Function2(const MonIsrFnTy _far * IsrPFn) { } |
Additional reference words: 1.00 1.50 7.00 8.00 8.00c
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |