Skip to content

Commit a1d2b3d

Browse files
Merge pull request #5654 from Rageking8/structure-error-references-in-range-c3011-c3030
Structure error references in range [C3011, C3030]
2 parents de165de + 2361791 commit a1d2b3d

20 files changed

+151
-101
lines changed

docs/error-messages/compiler-errors-2/compiler-error-c3011.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: Compiler Error C3011"
32
title: "Compiler Error C3011"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3011"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3011"]
66
helpviewer_keywords: ["C3011"]
7-
ms.assetid: 24c3a917-ebff-4deb-9155-23adf6468531
87
---
98
# Compiler Error C3011
109

11-
inline assembly not allowed directly within a parallel region
10+
> inline assembly not allowed directly within a parallel region
11+
12+
## Remarks
1213

1314
An `omp` parallel region cannot contain inline assembly instructions.
1415

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

1720
```cpp
1821
// C3011.cpp

docs/error-messages/compiler-errors-2/compiler-error-c3012.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
---
2-
description: "Learn more about: Compiler Error C3012"
32
title: "Compiler Error C3012"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3012"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3012"]
66
helpviewer_keywords: ["C3012"]
7-
ms.assetid: cc7040b1-b3fb-4da6-a474-877914d30332
87
---
98
# Compiler Error C3012
109

1110
> '*intrinsic*' : intrinsic function not allowed directly within a parallel region
1211
12+
## Remarks
13+
1314
A [compiler intrinsic](../../intrinsics/compiler-intrinsics.md) function is not allowed in an `omp parallel` region. To fix this issue, move intrinsics out of the region, or replace them with non-intrinsic equivalents.
1415

1516
## Example
1617

17-
The following sample generates C3012, and shows one way to fix it:
18+
The following example generates C3012, and shows one way to fix it:
1819

1920
```cpp
2021
// C3012.cpp

docs/error-messages/compiler-errors-2/compiler-error-c3013.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: Compiler Error C3013"
32
title: "Compiler Error C3013"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3013"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3013"]
66
helpviewer_keywords: ["C3013"]
7-
ms.assetid: f896777d-27e6-4b6d-baab-1567317f3374
87
---
98
# Compiler Error C3013
109

11-
'clause' : clause may only appear once on OpenMP 'directive' directive
10+
> 'clause' : clause may only appear once on OpenMP 'directive' directive
11+
12+
## Remarks
1213

1314
A clause appeared twice on the same directive. Delete one occurrence of the clause.
1415

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

1720
```cpp
1821
// C3013.cpp

docs/error-messages/compiler-errors-2/compiler-error-c3014.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: Compiler Error C3014"
32
title: "Compiler Error C3014"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3014"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3014"]
66
helpviewer_keywords: ["C3014"]
7-
ms.assetid: af1c5b0c-dbf9-4274-b06a-c6c2cdcf2a52
87
---
98
# Compiler Error C3014
109

11-
expected a for loop following OpenMP 'directive' directive
10+
> expected a for loop following OpenMP 'directive' directive
11+
12+
## Remarks
1213

1314
It is an error for anything other than a **`for`** loop to immediately follow a `#pragma omp for` directive.
1415

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

1720
```cpp
1821
// C3014.cpp

docs/error-messages/compiler-errors-2/compiler-error-c3015.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: Compiler Error C3015"
32
title: "Compiler Error C3015"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3015"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3015"]
66
helpviewer_keywords: ["C3015"]
7-
ms.assetid: d5e8e50b-7542-4b2d-8665-1b22072a5bc6
87
---
98
# Compiler Error C3015
109

11-
initialization in OpenMP 'for' statement has improper form
10+
> initialization in OpenMP 'for' statement has improper form
11+
12+
## Remarks
1213

1314
A **`for`** loop in an OpenMP statement must be fully and explicitly specified.
1415

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

1720
```cpp
1821
// C3015.cpp

docs/error-messages/compiler-errors-2/compiler-error-c3016.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: Compiler Error C3016"
32
title: "Compiler Error C3016"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3016"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3016"]
66
helpviewer_keywords: ["C3016"]
7-
ms.assetid: 3423467e-e8bb-4f35-b4db-7925cafa74c1
87
---
98
# Compiler Error C3016
109

11-
'var' : index variable in OpenMP 'for' statement must have signed integral type
10+
> 'var' : index variable in OpenMP 'for' statement must have signed integral type
11+
12+
## Remarks
1213

1314
The index variable in an OpenMP **`for`** statement must be a signed integral type.
1415

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

1720
```cpp
1821
// C3016.cpp

docs/error-messages/compiler-errors-2/compiler-error-c3017.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: Compiler Error C3017"
32
title: "Compiler Error C3017"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3017"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3017"]
66
helpviewer_keywords: ["C3017"]
7-
ms.assetid: 12ab2c2a-d0d2-4900-9cbf-39be0af590dd
87
---
98
# Compiler Error C3017
109

11-
termination test in OpenMP 'for' statement has improper form
10+
> termination test in OpenMP 'for' statement has improper form
11+
12+
## Remarks
1213

1314
A **`for`** loop in an OpenMP statement must be fully and explicitly specified.
1415

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

1720
```cpp
1821
// C3017.cpp

docs/error-messages/compiler-errors-2/compiler-error-c3018.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: Compiler Error C3018"
32
title: "Compiler Error C3018"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3018"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3018"]
66
helpviewer_keywords: ["C3018"]
7-
ms.assetid: 685be45f-f116-43a8-a88d-05ab6616e2f1
87
---
98
# Compiler Error C3018
109

11-
'var1' : OpenMP 'for' test or increment must use index variable 'var2'
10+
> 'var1' : OpenMP 'for' test or increment must use index variable 'var2'
11+
12+
## Remarks
1213

1314
A **`for`** loop in an OpenMP statement must use the same variable for its test and increment as it uses for its index.
1415

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

1720
```cpp
1821
// C3018.cpp

docs/error-messages/compiler-errors-2/compiler-error-c3019.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: Compiler Error C3019"
32
title: "Compiler Error C3019"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3019"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3019"]
66
helpviewer_keywords: ["C3019"]
7-
ms.assetid: 31a6d9b6-d29f-4499-9ad8-48dd751e87c7
87
---
98
# Compiler Error C3019
109

11-
increment in OpenMP 'for' statement has improper form
10+
> increment in OpenMP 'for' statement has improper form
11+
12+
## Remarks
1213

1314
The increment part of an OpenMP **`for`** loop must use the index variable both on the left and right side of the operator.
1415

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

1720
```cpp
1821
// C3019.cpp

docs/error-messages/compiler-errors-2/compiler-error-c3020.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
---
2-
description: "Learn more about: Compiler Error C3020"
32
title: "Compiler Error C3020"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3020"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3020"]
66
helpviewer_keywords: ["C3020"]
7-
ms.assetid: f625c7a3-afaa-4bd8-9c1b-51891b832f36
87
---
98
# Compiler Error C3020
109

11-
'var' : index variable of OpenMP 'for' loop cannot be modified in loop body
10+
> 'var' : index variable of OpenMP 'for' loop cannot be modified in loop body
11+
12+
## Remarks
1213

1314
An OpenMP **`for`** loop may not modify the index (loop counter) in the body of the **`for`** loop.
1415

15-
The following sample generates C3020:
16+
## Examples
17+
18+
The following example generates C3020:
1619

1720
```cpp
1821
// C3020.cpp
@@ -33,7 +36,7 @@ int main() {
3336

3437
A variable declared with [lastprivate](../../parallel/openmp/reference/openmp-clauses.md#lastprivate) cannot be used as the index inside a parallelized loop.
3538

36-
The following sample will give C3020 for the second lastprivate because that lastprivate will trigger a write to idx_a within the outermost for loop. The first lastprivate doesn't give an error because that lastprivate triggers a write to idx_a outside the outermost for loop (technically, at the very end of the last iteration). The following sample generates C3020.
39+
The following example will give C3020 for the second lastprivate because that lastprivate will trigger a write to idx_a within the outermost for loop. The first lastprivate doesn't give an error because that lastprivate triggers a write to idx_a outside the outermost for loop (technically, at the very end of the last iteration). The following example generates C3020.
3740

3841
```cpp
3942
// C3020b.cpp
@@ -52,7 +55,7 @@ void test(int first, int last)
5255
}
5356
```
5457
55-
The following sample demonstrates a possible resolution:
58+
The following example demonstrates a possible resolution:
5659
5760
```cpp
5861
// C3020c.cpp

0 commit comments

Comments
 (0)