Skip to content

Commit dc759c7

Browse files
author
Colin Robertson
committed
Make C1001 more useful
1 parent 0184dfa commit dc759c7

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

docs/error-messages/compiler-errors-1/fatal-error-c1001.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,13 @@ translation.priority.ht:
3535
- "zh-tw"
3636
---
3737
# Fatal Error C1001
38-
INTERNAL COMPILER ERROR(compiler file file, line number)
38+
39+
> INTERNAL COMPILER ERROR(compiler file *file*, line *number*)
3940
40-
The compiler cannot generate correct code for a construct, probably due to the combination of an expression and an optimization option. Try removing one or more optimization options and recompiling the function containing the line indicated in the error message.
41-
42-
You can probably fix the problem by removing one or more optimization options. To determine which option is at fault, remove options one at a time and recompile until the error message goes away. The options most commonly responsible are **/Og**, **/Oi**, and `/Oa`. Once you determine which option is responsible, you can disable it using the [optimize](../../preprocessor/optimize.md) pragma around the function where the error occurs and continue to use the option for the rest of the module.
43-
44-
The Microsoft Knowledge Base has more information about C1001; see [http://support.microsoft.com/default.aspx?scid=kb;en-us;134650](http://support.microsoft.com/default.aspx?scid=kb;en-us;134650).
45-
46-
Try rewriting the line where the error is reported, or several lines of code surrounding that line.
41+
The compiler cannot generate correct code for a construct, often due to the combination of a particular expression and an optimization option, or an issue in parsing. If the compiler file listed has a utc or C2 path segment, it is probably an optimization error. If the file has a cxxfe or c1xx path segment, or is msc1.cpp, it is probably a parser error. If the file named is cl.exe, there is no other information available.
42+
43+
You can often fix an optimization problem by removing one or more optimization options. To determine which option is at fault, remove options one at a time and recompile until the error message goes away. The options most commonly responsible are [/Og (Global optimizations)](../../build/reference/og-global-optimizations.md) and [/Oi (Generate Intrinsic Functions)](../../build/reference/og-generate-intrinsic-functions.md). Once you determine which optimization option is responsible, you can disable it around the function where the error occurs by using the [optimize](../../preprocessor/optimize.md) pragma, and continue to use the option for the rest of the module. For more information about optimization options, see [Optimization best practices](../../build/reference/optimization-best-practices.md).
44+
45+
If optimizations are not responsible for the error, try rewriting the line where the error is reported, or several lines of code surrounding that line. To see the code the way the compiler sees it after preprocessing, you can use the [/P (Preprocess to a file)](../../build/reference/p-preprocess-to-a-file.md) option.
46+
47+
For more information about how to isolate the source of the error and how to report an internal compiler error to Microsoft, see [How to Report a Problem with the Visual C++ Toolset](../../how-to-report-a-problem-with-the-visual-cpp-toolset.md).

0 commit comments

Comments
 (0)