Skip to content

Commit 1e4cdcf

Browse files
authored
Merge pull request #5465 from Rageking8/structure-error-references-in-range-c1001-c1020
Structure error references in range [C1001, C1020]
2 parents 6c82190 + f7309f1 commit 1e4cdcf

19 files changed

+100
-72
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
---
2-
description: "Learn more about: Fatal Error C1001"
32
title: "Fatal Error C1001"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Fatal Error C1001"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C1001"]
66
helpviewer_keywords: ["C1001"]
7-
ms.assetid: 5736cdb3-22c8-4fad-aa85-d5e0d2b232f4
87
---
98
# Fatal Error C1001
109

1110
> INTERNAL COMPILER ERROR(compiler file *file*, line *number*)
1211
12+
## Remarks
13+
1314
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.
1415

1516
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).

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
---
2-
description: "Learn more about: Fatal Error C1002"
32
title: "Fatal Error C1002"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Fatal Error C1002"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C1002"]
66
helpviewer_keywords: ["C1002"]
7-
ms.assetid: bd6d274a-c7b4-43af-8bf2-23c5e442aa22
87
---
98
# Fatal Error C1002
109

11-
compiler is out of heap space in pass 2
10+
> compiler is out of heap space in pass 2
11+
12+
## Remarks
1213

1314
The compiler ran out of dynamic memory space during its second pass, probably due to a program with too many symbols or complex expressions.
1415

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
---
2-
description: "Learn more about: Fatal Error C1003"
32
title: "Fatal Error C1003"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Fatal Error C1003"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C1003"]
66
helpviewer_keywords: ["C1003"]
7-
ms.assetid: 27d2d009-2e0f-41fb-8bfc-372752fbe920
87
---
98
# Fatal Error C1003
109

11-
error count exceeds number; stopping compilation
10+
> error count exceeds number; stopping compilation
11+
12+
## Remarks
1213

1314
Errors in the program are too numerous to allow recovery. The compiler must terminate.

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
---
2-
description: "Learn more about: Fatal Error C1004"
32
title: "Fatal Error C1004"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Fatal Error C1004"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C1004"]
66
helpviewer_keywords: ["C1004"]
7-
ms.assetid: dbe034b0-6eb0-41b4-a50c-2fccf9e78ad4
87
---
98
# Fatal Error C1004
109

11-
unexpected end of file found
10+
> unexpected end of file found
11+
12+
## Remarks
1213

1314
The compiler reached the end of a source file without resolving a construct. The code may be missing one of the following elements:
1415

@@ -28,7 +29,9 @@ To resolve this error, check for the following:
2829

2930
- A source file does not end with a carriage return and line feed.
3031

31-
The following sample generates C1004:
32+
## Example
33+
34+
The following example generates C1004:
3235

3336
```cpp
3437
// C1004.cpp

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
---
2-
description: "Learn more about: Fatal Error C1005"
32
title: "Fatal Error C1005"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Fatal Error C1005"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C1005"]
66
helpviewer_keywords: ["C1005"]
7-
ms.assetid: 150daf8e-a38a-4669-9c1a-a05b5a1f65ef
87
---
98
# Fatal Error C1005
109

11-
string too big for buffer
10+
> string too big for buffer
11+
12+
## Remarks
1213

1314
A string in a compiler intermediate file overflowed a buffer.
1415

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
---
2-
description: "Learn more about: Fatal Error C1007"
32
title: "Fatal Error C1007"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Fatal Error C1007"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C1007"]
66
helpviewer_keywords: ["C1007"]
7-
ms.assetid: 224f7e2c-4522-4e09-b455-8d293bdb799d
87
---
98
# Fatal Error C1007
109

11-
unrecognized flag string in option
10+
> unrecognized flag string in option
11+
12+
## Remarks
1213

1314
The command-line option contains an invalid string. Check the **CL** command line and environment variable for errors.
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
---
2-
description: "Learn more about: Fatal Error C1008"
32
title: "Fatal Error C1008"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Fatal Error C1008"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C1008"]
66
helpviewer_keywords: ["C1008"]
7-
ms.assetid: 7de729e3-b2ca-4a68-95ab-8a1c920f3f2c
87
---
98
# Fatal Error C1008
109

11-
no input file specified
10+
> no input file specified
11+
12+
## Remarks
1213

1314
The compiler was not given a C or C++ source file to compile. Check the **CL** command line and environment variable for filename specifications.
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
---
2-
description: "Learn more about: Fatal Error C1009"
32
title: "Fatal Error C1009"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Fatal Error C1009"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C1009"]
66
helpviewer_keywords: ["C1009"]
7-
ms.assetid: dcc8383c-3362-4c47-9c26-25d2451ebd53
87
---
98
# Fatal Error C1009
109

11-
compiler limit : macros nested too deeply
10+
> compiler limit : macros nested too deeply
11+
12+
## Remarks
1213

1314
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.

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
description: "Learn more about: Fatal Error C1010"
32
title: "Fatal Error C1010"
4-
ms.date: "09/03/2019"
3+
description: "Learn more about: Fatal Error C1010"
4+
ms.date: 09/03/2019
55
f1_keywords: ["C1010"]
66
helpviewer_keywords: ["C1010"]
7-
ms.assetid: dfd035f1-a7a2-40bc-bc92-dc4d7f456767
87
---
98
# Fatal Error C1010
109

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
description: "Learn more about: Fatal Error C1011"
32
title: "Fatal Error C1011"
3+
description: "Learn more about: Fatal Error C1011"
44
ms.date: 08/17/2022
55
f1_keywords: ["C1011"]
66
helpviewer_keywords: ["C1011"]

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
---
22
title: "Fatal Error C1012"
33
description: "Learn more about: Fatal Error C1012"
4-
ms.date: "02/20/2025"
4+
ms.date: 02/20/2025
55
f1_keywords: ["C1012"]
66
helpviewer_keywords: ["C1012"]
77
---
88
# Fatal Error C1012
99

10-
unmatched parenthesis: missing 'character'
10+
> unmatched parenthesis: missing 'character'
11+
12+
## Remarks
1113

1214
The parentheses in a preprocessor directive do not match.
1315

14-
The following sample generates C1012:
16+
## Example
17+
18+
The following example generates C1012:
1519

1620
```cpp
1721
// C1012.cpp

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
---
2-
description: "Learn more about: Fatal Error C1013"
32
title: "Fatal Error C1013"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Fatal Error C1013"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C1013"]
66
helpviewer_keywords: ["C1013"]
7-
ms.assetid: 5514a679-efe7-4055-bdd3-5693ca0c332f
87
---
98
# Fatal Error C1013
109

11-
compiler limit : too many open parentheses
10+
> compiler limit : too many open parentheses
11+
12+
## Remarks
1213

1314
An expression contains too many levels of parentheses in a single expression. Simplify the expression or break it into multiple statements.
1415

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
---
2-
description: "Learn more about: Fatal Error C1014"
32
title: "Fatal Error C1014"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Fatal Error C1014"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C1014"]
66
helpviewer_keywords: ["C1014"]
7-
ms.assetid: 4c01ef70-e765-4d07-a3fe-a11c19fb610b
87
---
98
# Fatal Error C1014
109

11-
too many include files : depth = level
10+
> too many include files : depth = level
11+
12+
## Remarks
1213

1314
The nesting of `#include` directives is too deep. Nested directives can include open files. The source file containing the directive counts as one file.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@ helpviewer_keywords: ["C1015"]
99

1010
> 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
1111
12+
## Remarks
13+
1214
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).

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
---
2-
description: "Learn more about: Fatal Error C1016"
32
title: "Fatal Error C1016"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Fatal Error C1016"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C1016"]
66
helpviewer_keywords: ["C1016"]
7-
ms.assetid: 33f45c3e-2d8f-43ad-a445-c412d1d54ce1
87
---
98
# Fatal Error C1016
109

11-
\#ifdef expected an identifier#ifndef expected an identifier
10+
> #ifdef expected an identifier#ifndef expected an identifier
11+
12+
## Remarks
1213

1314
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.
1415

15-
The following sample generates C1016:
16+
## Example
17+
18+
The following example generates C1016:
1619

1720
```cpp
1821
// C1016.cpp

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

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
---
2-
description: "Learn more about: Fatal Error C1017"
32
title: "Fatal Error C1017"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Fatal Error C1017"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C1017"]
66
helpviewer_keywords: ["C1017"]
7-
ms.assetid: 5542e604-599d-4e36-8f83-1d454c5753c9
87
---
98
# Fatal Error C1017
109

11-
invalid integer constant expression
10+
> invalid integer constant expression
11+
12+
## Remarks
1213

1314
The expression in an `#if` directive did not exist or did not evaluate to a constant.
1415

1516
Constants defined using `#define` must have values that evaluate to an integer constant if they are used in an `#if`, `#elif`, or `#else` directive.
1617

17-
The following sample generates C1017:
18+
## Example
19+
20+
The following example generates C1017:
1821

1922
```cpp
2023
// C1017.cpp
@@ -35,7 +38,7 @@ Possible resolution:
3538

3639
Because `CONSTANT_NAME` evaluates to a string and not an integer, the `#if` directive generates fatal error C1017.
3740

38-
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.
41+
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.
3942

4043
```cpp
4144
// C1017c.cpp

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
---
2-
description: "Learn more about: Fatal Error C1018"
32
title: "Fatal Error C1018"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Fatal Error C1018"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C1018"]
66
helpviewer_keywords: ["C1018"]
7-
ms.assetid: 2ceb8a99-30b2-4b80-bf42-e9f3305b3c52
87
---
98
# Fatal Error C1018
109

11-
unexpected #elif
10+
> unexpected #elif
11+
12+
## Remarks
1213

1314
The `#elif` directive appears outside an `#if`, `#ifdef`, or `#ifndef` construct. Use `#elif` only within one of these constructs.
1415

15-
The following sample generates C1018:
16+
## Example
17+
18+
The following example generates C1018:
1619

1720
```cpp
1821
// C1018.cpp

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
---
2-
description: "Learn more about: Fatal Error C1019"
32
title: "Fatal Error C1019"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Fatal Error C1019"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C1019"]
66
helpviewer_keywords: ["C1019"]
7-
ms.assetid: c4f8968b-bc62-4200-b3ca-69d06c163236
87
---
98
# Fatal Error C1019
109

11-
unexpected #else
10+
> unexpected #else
11+
12+
## Remarks
1213

1314
The `#else` directive appears outside an `#if`, `#ifdef`, or `#ifndef` construct. Use `#else` only within one of these constructs.
1415

15-
The following sample generates C1019:
16+
## Example
17+
18+
The following example generates C1019:
1619

1720
```cpp
1821
// C1019.cpp

0 commit comments

Comments
 (0)