Skip to content

Commit 87e152c

Browse files
authored
Add "Remarks" and "Example" headings for error references in range [C3011, C3030]
1 parent c47a61b commit 87e152c

20 files changed

+70
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 24c3a917-ebff-4deb-9155-23adf6468531
1010

1111
> inline assembly not allowed directly within a parallel region
1212
13+
## Remarks
14+
1315
An `omp` parallel region cannot contain inline assembly instructions.
1416

17+
## Example
18+
1519
The following sample generates C3011:
1620

1721
```cpp

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: cc7040b1-b3fb-4da6-a474-877914d30332
1010

1111
> '*intrinsic*' : intrinsic function not allowed directly within a parallel region
1212
13+
## Remarks
14+
1315
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.
1416

1517
## Example

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: f896777d-27e6-4b6d-baab-1567317f3374
1010

1111
> 'clause' : clause may only appear once on OpenMP 'directive' directive
1212
13+
## Remarks
14+
1315
A clause appeared twice on the same directive. Delete one occurrence of the clause.
1416

17+
## Example
18+
1519
The following sample generates C3013:
1620

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: af1c5b0c-dbf9-4274-b06a-c6c2cdcf2a52
1010

1111
> expected a for loop following OpenMP 'directive' directive
1212
13+
## Remarks
14+
1315
It is an error for anything other than a **`for`** loop to immediately follow a `#pragma omp for` directive.
1416

17+
## Example
18+
1519
The following sample generates C3014:
1620

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: d5e8e50b-7542-4b2d-8665-1b22072a5bc6
1010

1111
> initialization in OpenMP 'for' statement has improper form
1212
13+
## Remarks
14+
1315
A **`for`** loop in an OpenMP statement must be fully and explicitly specified.
1416

17+
## Example
18+
1519
The following sample generates C3015:
1620

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 3423467e-e8bb-4f35-b4db-7925cafa74c1
1010

1111
> 'var' : index variable in OpenMP 'for' statement must have signed integral type
1212
13+
## Remarks
14+
1315
The index variable in an OpenMP **`for`** statement must be a signed integral type.
1416

17+
## Example
18+
1519
The following sample generates C3016:
1620

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 12ab2c2a-d0d2-4900-9cbf-39be0af590dd
1010

1111
> termination test in OpenMP 'for' statement has improper form
1212
13+
## Remarks
14+
1315
A **`for`** loop in an OpenMP statement must be fully and explicitly specified.
1416

17+
## Example
18+
1519
The following sample generates C3017:
1620

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 685be45f-f116-43a8-a88d-05ab6616e2f1
1010

1111
> 'var1' : OpenMP 'for' test or increment must use index variable 'var2'
1212
13+
## Remarks
14+
1315
A **`for`** loop in an OpenMP statement must use the same variable for its test and increment as it uses for its index.
1416

17+
## Example
18+
1519
The following sample generates C3018:
1620

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 31a6d9b6-d29f-4499-9ad8-48dd751e87c7
1010

1111
> increment in OpenMP 'for' statement has improper form
1212
13+
## Remarks
14+
1315
The increment part of an OpenMP **`for`** loop must use the index variable both on the left and right side of the operator.
1416

17+
## Example
18+
1519
The following sample generates C3019:
1620

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: f625c7a3-afaa-4bd8-9c1b-51891b832f36
1010

1111
> 'var' : index variable of OpenMP 'for' loop cannot be modified in loop body
1212
13+
## Remarks
14+
1315
An OpenMP **`for`** loop may not modify the index (loop counter) in the body of the **`for`** loop.
1416

17+
## Examples
18+
1519
The following sample generates C3020:
1620

1721
```cpp

0 commit comments

Comments
 (0)