diff --git a/docs/error-messages/compiler-errors-1/fatal-error-c1001.md b/docs/error-messages/compiler-errors-1/fatal-error-c1001.md index d2dc62f249..bcf89b5bd8 100644 --- a/docs/error-messages/compiler-errors-1/fatal-error-c1001.md +++ b/docs/error-messages/compiler-errors-1/fatal-error-c1001.md @@ -1,15 +1,16 @@ --- -description: "Learn more about: Fatal Error C1001" title: "Fatal Error C1001" -ms.date: "11/04/2016" +description: "Learn more about: Fatal Error C1001" +ms.date: 11/04/2016 f1_keywords: ["C1001"] helpviewer_keywords: ["C1001"] -ms.assetid: 5736cdb3-22c8-4fad-aa85-d5e0d2b232f4 --- # Fatal Error C1001 > INTERNAL COMPILER ERROR(compiler file *file*, line *number*) +## Remarks + 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. 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/oi-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/optimization-best-practices.md). diff --git a/docs/error-messages/compiler-errors-1/fatal-error-c1002.md b/docs/error-messages/compiler-errors-1/fatal-error-c1002.md index c001659abf..d254d4e5ce 100644 --- a/docs/error-messages/compiler-errors-1/fatal-error-c1002.md +++ b/docs/error-messages/compiler-errors-1/fatal-error-c1002.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Fatal Error C1002" title: "Fatal Error C1002" -ms.date: "11/04/2016" +description: "Learn more about: Fatal Error C1002" +ms.date: 11/04/2016 f1_keywords: ["C1002"] helpviewer_keywords: ["C1002"] -ms.assetid: bd6d274a-c7b4-43af-8bf2-23c5e442aa22 --- # Fatal Error C1002 -compiler is out of heap space in pass 2 +> compiler is out of heap space in pass 2 + +## Remarks The compiler ran out of dynamic memory space during its second pass, probably due to a program with too many symbols or complex expressions. diff --git a/docs/error-messages/compiler-errors-1/fatal-error-c1003.md b/docs/error-messages/compiler-errors-1/fatal-error-c1003.md index 651a5259ea..453e163d0d 100644 --- a/docs/error-messages/compiler-errors-1/fatal-error-c1003.md +++ b/docs/error-messages/compiler-errors-1/fatal-error-c1003.md @@ -1,13 +1,14 @@ --- -description: "Learn more about: Fatal Error C1003" title: "Fatal Error C1003" -ms.date: "11/04/2016" +description: "Learn more about: Fatal Error C1003" +ms.date: 11/04/2016 f1_keywords: ["C1003"] helpviewer_keywords: ["C1003"] -ms.assetid: 27d2d009-2e0f-41fb-8bfc-372752fbe920 --- # Fatal Error C1003 -error count exceeds number; stopping compilation +> error count exceeds number; stopping compilation + +## Remarks Errors in the program are too numerous to allow recovery. The compiler must terminate. diff --git a/docs/error-messages/compiler-errors-1/fatal-error-c1004.md b/docs/error-messages/compiler-errors-1/fatal-error-c1004.md index 266090b83c..e611dbbc9e 100644 --- a/docs/error-messages/compiler-errors-1/fatal-error-c1004.md +++ b/docs/error-messages/compiler-errors-1/fatal-error-c1004.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Fatal Error C1004" title: "Fatal Error C1004" -ms.date: "11/04/2016" +description: "Learn more about: Fatal Error C1004" +ms.date: 11/04/2016 f1_keywords: ["C1004"] helpviewer_keywords: ["C1004"] -ms.assetid: dbe034b0-6eb0-41b4-a50c-2fccf9e78ad4 --- # Fatal Error C1004 -unexpected end of file found +> unexpected end of file found + +## Remarks The compiler reached the end of a source file without resolving a construct. The code may be missing one of the following elements: @@ -28,7 +29,9 @@ To resolve this error, check for the following: - A source file does not end with a carriage return and line feed. -The following sample generates C1004: +## Example + +The following example generates C1004: ```cpp // C1004.cpp diff --git a/docs/error-messages/compiler-errors-1/fatal-error-c1005.md b/docs/error-messages/compiler-errors-1/fatal-error-c1005.md index cbb2d4aa5b..2d2a87369b 100644 --- a/docs/error-messages/compiler-errors-1/fatal-error-c1005.md +++ b/docs/error-messages/compiler-errors-1/fatal-error-c1005.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Fatal Error C1005" title: "Fatal Error C1005" -ms.date: "11/04/2016" +description: "Learn more about: Fatal Error C1005" +ms.date: 11/04/2016 f1_keywords: ["C1005"] helpviewer_keywords: ["C1005"] -ms.assetid: 150daf8e-a38a-4669-9c1a-a05b5a1f65ef --- # Fatal Error C1005 -string too big for buffer +> string too big for buffer + +## Remarks A string in a compiler intermediate file overflowed a buffer. diff --git a/docs/error-messages/compiler-errors-1/fatal-error-c1007.md b/docs/error-messages/compiler-errors-1/fatal-error-c1007.md index 23d81272a5..55a3c31b1d 100644 --- a/docs/error-messages/compiler-errors-1/fatal-error-c1007.md +++ b/docs/error-messages/compiler-errors-1/fatal-error-c1007.md @@ -1,13 +1,14 @@ --- -description: "Learn more about: Fatal Error C1007" title: "Fatal Error C1007" -ms.date: "11/04/2016" +description: "Learn more about: Fatal Error C1007" +ms.date: 11/04/2016 f1_keywords: ["C1007"] helpviewer_keywords: ["C1007"] -ms.assetid: 224f7e2c-4522-4e09-b455-8d293bdb799d --- # Fatal Error C1007 -unrecognized flag string in option +> unrecognized flag string in option + +## Remarks The command-line option contains an invalid string. Check the **CL** command line and environment variable for errors. diff --git a/docs/error-messages/compiler-errors-1/fatal-error-c1008.md b/docs/error-messages/compiler-errors-1/fatal-error-c1008.md index df73ac1ebd..1ad6c868ba 100644 --- a/docs/error-messages/compiler-errors-1/fatal-error-c1008.md +++ b/docs/error-messages/compiler-errors-1/fatal-error-c1008.md @@ -1,13 +1,14 @@ --- -description: "Learn more about: Fatal Error C1008" title: "Fatal Error C1008" -ms.date: "11/04/2016" +description: "Learn more about: Fatal Error C1008" +ms.date: 11/04/2016 f1_keywords: ["C1008"] helpviewer_keywords: ["C1008"] -ms.assetid: 7de729e3-b2ca-4a68-95ab-8a1c920f3f2c --- # Fatal Error C1008 -no input file specified +> no input file specified + +## Remarks The compiler was not given a C or C++ source file to compile. Check the **CL** command line and environment variable for filename specifications. diff --git a/docs/error-messages/compiler-errors-1/fatal-error-c1009.md b/docs/error-messages/compiler-errors-1/fatal-error-c1009.md index 358d670bec..5ba6678782 100644 --- a/docs/error-messages/compiler-errors-1/fatal-error-c1009.md +++ b/docs/error-messages/compiler-errors-1/fatal-error-c1009.md @@ -1,13 +1,14 @@ --- -description: "Learn more about: Fatal Error C1009" title: "Fatal Error C1009" -ms.date: "11/04/2016" +description: "Learn more about: Fatal Error C1009" +ms.date: 11/04/2016 f1_keywords: ["C1009"] helpviewer_keywords: ["C1009"] -ms.assetid: dcc8383c-3362-4c47-9c26-25d2451ebd53 --- # Fatal Error C1009 -compiler limit : macros nested too deeply +> compiler limit : macros nested too deeply + +## Remarks The compiler tried to expand too many macros at the same time. The compiler has a limit of 256 levels of nested macros. Split nested macros into simpler macros. diff --git a/docs/error-messages/compiler-errors-1/fatal-error-c1010.md b/docs/error-messages/compiler-errors-1/fatal-error-c1010.md index 775bed3719..eb64115ebd 100644 --- a/docs/error-messages/compiler-errors-1/fatal-error-c1010.md +++ b/docs/error-messages/compiler-errors-1/fatal-error-c1010.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: Fatal Error C1010" title: "Fatal Error C1010" -ms.date: "09/03/2019" +description: "Learn more about: Fatal Error C1010" +ms.date: 09/03/2019 f1_keywords: ["C1010"] helpviewer_keywords: ["C1010"] -ms.assetid: dfd035f1-a7a2-40bc-bc92-dc4d7f456767 --- # Fatal Error C1010 diff --git a/docs/error-messages/compiler-errors-1/fatal-error-c1011.md b/docs/error-messages/compiler-errors-1/fatal-error-c1011.md index b7517a9e35..b50d6450ef 100644 --- a/docs/error-messages/compiler-errors-1/fatal-error-c1011.md +++ b/docs/error-messages/compiler-errors-1/fatal-error-c1011.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: Fatal Error C1011" title: "Fatal Error C1011" +description: "Learn more about: Fatal Error C1011" ms.date: 08/17/2022 f1_keywords: ["C1011"] helpviewer_keywords: ["C1011"] diff --git a/docs/error-messages/compiler-errors-1/fatal-error-c1012.md b/docs/error-messages/compiler-errors-1/fatal-error-c1012.md index 21849c9d15..33245ef2b6 100644 --- a/docs/error-messages/compiler-errors-1/fatal-error-c1012.md +++ b/docs/error-messages/compiler-errors-1/fatal-error-c1012.md @@ -1,17 +1,21 @@ --- title: "Fatal Error C1012" description: "Learn more about: Fatal Error C1012" -ms.date: "02/20/2025" +ms.date: 02/20/2025 f1_keywords: ["C1012"] helpviewer_keywords: ["C1012"] --- # Fatal Error C1012 -unmatched parenthesis: missing 'character' +> unmatched parenthesis: missing 'character' + +## Remarks The parentheses in a preprocessor directive do not match. -The following sample generates C1012: +## Example + +The following example generates C1012: ```cpp // C1012.cpp diff --git a/docs/error-messages/compiler-errors-1/fatal-error-c1013.md b/docs/error-messages/compiler-errors-1/fatal-error-c1013.md index c8950e24e8..f0f85a0ee1 100644 --- a/docs/error-messages/compiler-errors-1/fatal-error-c1013.md +++ b/docs/error-messages/compiler-errors-1/fatal-error-c1013.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Fatal Error C1013" title: "Fatal Error C1013" -ms.date: "11/04/2016" +description: "Learn more about: Fatal Error C1013" +ms.date: 11/04/2016 f1_keywords: ["C1013"] helpviewer_keywords: ["C1013"] -ms.assetid: 5514a679-efe7-4055-bdd3-5693ca0c332f --- # Fatal Error C1013 -compiler limit : too many open parentheses +> compiler limit : too many open parentheses + +## Remarks An expression contains too many levels of parentheses in a single expression. Simplify the expression or break it into multiple statements. diff --git a/docs/error-messages/compiler-errors-1/fatal-error-c1014.md b/docs/error-messages/compiler-errors-1/fatal-error-c1014.md index 084aa82fad..678465c197 100644 --- a/docs/error-messages/compiler-errors-1/fatal-error-c1014.md +++ b/docs/error-messages/compiler-errors-1/fatal-error-c1014.md @@ -1,13 +1,14 @@ --- -description: "Learn more about: Fatal Error C1014" title: "Fatal Error C1014" -ms.date: "11/04/2016" +description: "Learn more about: Fatal Error C1014" +ms.date: 11/04/2016 f1_keywords: ["C1014"] helpviewer_keywords: ["C1014"] -ms.assetid: 4c01ef70-e765-4d07-a3fe-a11c19fb610b --- # Fatal Error C1014 -too many include files : depth = level +> too many include files : depth = level + +## Remarks The nesting of `#include` directives is too deep. Nested directives can include open files. The source file containing the directive counts as one file. diff --git a/docs/error-messages/compiler-errors-1/fatal-error-c1015.md b/docs/error-messages/compiler-errors-1/fatal-error-c1015.md index 71edb00f18..7b161e0ef8 100644 --- a/docs/error-messages/compiler-errors-1/fatal-error-c1015.md +++ b/docs/error-messages/compiler-errors-1/fatal-error-c1015.md @@ -9,4 +9,6 @@ helpviewer_keywords: ["C1015"] > header-names '*header-name*' and '*header-name*' identify the same header and cannot be used as both `/headerUnit:quote` and `/headerUnit:angle` arguments; please provide this header-name only once +## Remarks + Don't include a header unit using both double-quotes and angle brackets. Use only one form, consistent with the **`/headerUnit:quote`** or **`/headerUnit:angle`** compiler option. For more information, see [`/headerUnit` (Use header unit IFC)](../../build/reference/headerunit.md). diff --git a/docs/error-messages/compiler-errors-1/fatal-error-c1016.md b/docs/error-messages/compiler-errors-1/fatal-error-c1016.md index c921566c37..5dc38afa6a 100644 --- a/docs/error-messages/compiler-errors-1/fatal-error-c1016.md +++ b/docs/error-messages/compiler-errors-1/fatal-error-c1016.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Fatal Error C1016" title: "Fatal Error C1016" -ms.date: "11/04/2016" +description: "Learn more about: Fatal Error C1016" +ms.date: 11/04/2016 f1_keywords: ["C1016"] helpviewer_keywords: ["C1016"] -ms.assetid: 33f45c3e-2d8f-43ad-a445-c412d1d54ce1 --- # Fatal Error C1016 -\#ifdef expected an identifier#ifndef expected an identifier +> #ifdef expected an identifier#ifndef expected an identifier + +## Remarks The conditional compilation directive ([#ifdef](../../preprocessor/hash-ifdef-and-hash-ifndef-directives-c-cpp.md) or `#ifndef`) has no identifier to evaluate. To resolve the error, specify an identifier. -The following sample generates C1016: +## Example + +The following example generates C1016: ```cpp // C1016.cpp diff --git a/docs/error-messages/compiler-errors-1/fatal-error-c1017.md b/docs/error-messages/compiler-errors-1/fatal-error-c1017.md index cd6fbcbc77..7ae9f9c0d6 100644 --- a/docs/error-messages/compiler-errors-1/fatal-error-c1017.md +++ b/docs/error-messages/compiler-errors-1/fatal-error-c1017.md @@ -1,20 +1,23 @@ --- -description: "Learn more about: Fatal Error C1017" title: "Fatal Error C1017" -ms.date: "11/04/2016" +description: "Learn more about: Fatal Error C1017" +ms.date: 11/04/2016 f1_keywords: ["C1017"] helpviewer_keywords: ["C1017"] -ms.assetid: 5542e604-599d-4e36-8f83-1d454c5753c9 --- # Fatal Error C1017 -invalid integer constant expression +> invalid integer constant expression + +## Remarks The expression in an `#if` directive did not exist or did not evaluate to a constant. Constants defined using `#define` must have values that evaluate to an integer constant if they are used in an `#if`, `#elif`, or `#else` directive. -The following sample generates C1017: +## Example + +The following example generates C1017: ```cpp // C1017.cpp @@ -35,7 +38,7 @@ Possible resolution: Because `CONSTANT_NAME` evaluates to a string and not an integer, the `#if` directive generates fatal error C1017. -In other cases, the preprocessor evaluates an undefined constant as zero. This can cause unintended results, as shown in the following sample. `YES` is undefined, so it evaluates to zero. The expression `#if` `CONSTANT_NAME` evaluates to false and the code to be used on `YES` is removed by the preprocessor. `NO` is also undefined (zero), so `#elif` `CONSTANT_NAME==NO` evaluates to true (`0 == 0`), causing the preprocessor to leave the code in the `#elif` portion of the statement — exactly the opposite of the intended behavior. +In other cases, the preprocessor evaluates an undefined constant as zero. This can cause unintended results, as shown in the following example. `YES` is undefined, so it evaluates to zero. The expression `#if` `CONSTANT_NAME` evaluates to false and the code to be used on `YES` is removed by the preprocessor. `NO` is also undefined (zero), so `#elif` `CONSTANT_NAME==NO` evaluates to true (`0 == 0`), causing the preprocessor to leave the code in the `#elif` portion of the statement — exactly the opposite of the intended behavior. ```cpp // C1017c.cpp diff --git a/docs/error-messages/compiler-errors-1/fatal-error-c1018.md b/docs/error-messages/compiler-errors-1/fatal-error-c1018.md index 4283dedc9d..6a4fd9b145 100644 --- a/docs/error-messages/compiler-errors-1/fatal-error-c1018.md +++ b/docs/error-messages/compiler-errors-1/fatal-error-c1018.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Fatal Error C1018" title: "Fatal Error C1018" -ms.date: "11/04/2016" +description: "Learn more about: Fatal Error C1018" +ms.date: 11/04/2016 f1_keywords: ["C1018"] helpviewer_keywords: ["C1018"] -ms.assetid: 2ceb8a99-30b2-4b80-bf42-e9f3305b3c52 --- # Fatal Error C1018 -unexpected #elif +> unexpected #elif + +## Remarks The `#elif` directive appears outside an `#if`, `#ifdef`, or `#ifndef` construct. Use `#elif` only within one of these constructs. -The following sample generates C1018: +## Example + +The following example generates C1018: ```cpp // C1018.cpp diff --git a/docs/error-messages/compiler-errors-1/fatal-error-c1019.md b/docs/error-messages/compiler-errors-1/fatal-error-c1019.md index 5d51ab87de..b03103db4e 100644 --- a/docs/error-messages/compiler-errors-1/fatal-error-c1019.md +++ b/docs/error-messages/compiler-errors-1/fatal-error-c1019.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Fatal Error C1019" title: "Fatal Error C1019" -ms.date: "11/04/2016" +description: "Learn more about: Fatal Error C1019" +ms.date: 11/04/2016 f1_keywords: ["C1019"] helpviewer_keywords: ["C1019"] -ms.assetid: c4f8968b-bc62-4200-b3ca-69d06c163236 --- # Fatal Error C1019 -unexpected #else +> unexpected #else + +## Remarks The `#else` directive appears outside an `#if`, `#ifdef`, or `#ifndef` construct. Use `#else` only within one of these constructs. -The following sample generates C1019: +## Example + +The following example generates C1019: ```cpp // C1019.cpp diff --git a/docs/error-messages/compiler-errors-1/fatal-error-c1020.md b/docs/error-messages/compiler-errors-1/fatal-error-c1020.md index 1fb7fcdb59..877bba743f 100644 --- a/docs/error-messages/compiler-errors-1/fatal-error-c1020.md +++ b/docs/error-messages/compiler-errors-1/fatal-error-c1020.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: Fatal Error C1020" title: "Fatal Error C1020" +description: "Learn more about: Fatal Error C1020" ms.date: 07/11/2022 f1_keywords: ["C1020"] helpviewer_keywords: ["C1020"] -ms.assetid: 42f429e2-5e3b-4086-a10d-b99e032e51c5 --- # Fatal Error C1020 @@ -16,9 +15,9 @@ The `#endif` directive has no matching `#if`, `#ifdef`, or `#ifndef` directive. This error can occur if you have conditional preprocessor directives before you include a precompiled header file. The compiler ignores everything in the file before the precompiled header, including any `#if`, `#ifdef`, or `#ifndef` directives. For more information, see [`/Yu` (Use precompiled header)](../../build/reference/yu-use-precompiled-header-file.md). -## Examples +## Example -The following sample generates C1020: +The following example generates C1020: ```cpp // C1020.cpp