FIX: C1001 Generated Without Line Number or Compiler File

Q115530

1.00 WINDOWS kbtool kbfixlist kbbuglist ---------------------------------------------------------------------- The information in this article applies to: - The Microsoft C/C++ Compiler (CL.EXE), included with: - Microsoft Visual C++ for Windows, version 1.0 ---------------------------------------------------------------------- SYMPTOMS ======== Using the fast compiler option (/f) to compile code that contains a static variable in a static function, as illustrated in the sample code (in the "MORE INFORMATION" section, below), causes the following internal compiler error message to display: fatal error C1001: internal compiler error (compiler file '', line 1308) Notice that the error message does not contain the line within the user's source code where the error occurs, nor does the error message list the compiler file where the error is generated. RESOLUTION ========== There are two workarounds to this problem: - Compile using the optimizing compiler (/f-). -or- - Use the sample code in the "MORE INFORMATION" section, below, to remove the static modifier for either the function or the variable declaration. STATUS ====== Microsoft has confirmed this to be a problem in the Microsoft products listed above. This problem was corrected in Visual C++ version 1.5. MORE INFORMATION ================ The following sample code can be used to demonstrate this problem. Sample Code ----------- /* Compile options needed: /f /c */ static void func(void) { static char *p[] { "String 1", "String 2", "String 3", "String 4", "String 5" }; } Additional reference words: 8.00 1.00 KBCategory: kbtool kbfixlist kbbuglist KBSubcategory: CLIss

Keywords : kb16bitonly kbCompiler
Issue type :
Technology : kbVCsearch kbAudDeveloper kbCVCComp


Last Reviewed: May 5, 2001
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.