FIX: Unreferenced Static Functions Cause C1001 ErrorLast reviewed: September 16, 1997Article ID: Q106398 |
1.00
WINDOWS
kbtool kbfixlist kbbuglist
The information in this article applies to:
SYMPTOMSThe sample code belows generates the error:
fatal error C1001: internal compiler error (compiler file '', line 1308) CAUSEThe compiler fails because the function in the sample code below is declared as static, it is not referenced in the same source file by any other function, and it contains a static character pointer initialized to point to a string constant. The error occurs only under these very specific conditions.
RESOLUTIONTo work around the problem, compile with the /f- option or add optimizations to invoke the optimizing code generator rather than the fast code generator. The optimizing code generator will successfully compile the code. Alternatively, you could change either the function or the character pointer so they are not declared static.
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed above. This problem was corrected in Visual C++ version 1.5.
Sample Code
/* Compile options needed: none */static void fcn( void ) { static char *psz = "string";}
|
Additional reference words: 1.00 8.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |