FIX: "Fatal Error C1001" Error Message When You Compile Code with While Loop (320004)
The information in this article applies to:
- Microsoft Visual C++ .NET (2002)
This article was previously published under Q320004 SYMPTOMS When you try to compile code that is similar to the sample
code included in the "Steps to Reproduce the Problem" section of this article,
you may receive the following error message: "fatal
error C1001: INTERNAL COMPILER ERROR
(compiler file
'f:\vs70builds\9466\vc\Compiler\Utc\src\P2\main.c', line 146)"
CAUSE This behavior occurs because the optimizing compiler cannot
optimize the while loop. RESOLUTION To work around the issue, use one of the following methods:
- Turn off the /Og switch for the function by using the following command:
#pragma optimize("g",off) -or- - Declare the function parameter start to be volatile.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft
products that are listed at the beginning of this article.
This bug was corrected in Microsoft Visual C++ .NET (2003).
Modification Type: | Minor | Last Reviewed: | 7/5/2005 |
---|
Keywords: | kbfix kbbug kbCompiler kberrmsg kbpending KB320004 |
---|
|