Skip to content

Commit fc24cb3

Browse files
authored
Add "Remarks" and "Example" headings for error references in range [C3031, C3050]
1 parent 816ede4 commit fc24cb3

20 files changed

+78
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 7e621e7e-eda7-45b5-8836-29599cd05255
1010

1111
> 'var' : variable in 'reduction' clause must have scalar arithmetic type
1212
13+
## Remarks
14+
1315
A variable of the wrong type was passed to a reduction clause.
1416

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

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 6a92bd8e-319f-4a99-aef4-a9021f6f9928
1010

1111
> 'var' : variable in 'clause' clause cannot have incomplete type 'type'
1212
13+
## Remarks
14+
1315
Types passed to certain clauses must be fully visible to the compiler.
1416

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

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 8628b6bb-a650-4ed2-af13-57acd2f7ddbb
1010

1111
> 'var' : variable in 'clause' clause cannot have const-qualified type
1212
13+
## Remarks
14+
1315
Values passed to certain clauses cannot be **`const`** variables.
1416

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

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 49db8bac-2720-4622-94e3-7988f1603fa3
1010

1111
> OpenMP 'directive1' directive cannot be directly nested within 'directive2' directive
1212
13+
## Remarks
14+
1315
Some directives cannot be nested. To fix this error, you can merge the statements of both directives into the block of one directive, or you can construct consecutive directives.
1416

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

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: af34fad2-2b45-42d0-a9ff-04eab3e91c37
1010

1111
> OpenMP 'ordered' directive must bind directly to a 'for' or 'parallel for' directive with the 'ordered' clause
1212
13+
## Remarks
14+
1315
An ordered clause was ill formed.
1416

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

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 10c6993e-bc42-4a07-85c7-cdc34ac30906
1010

1111
> 'operator' : invalid operator token in OpenMP 'reduction' clause
1212
13+
## Remarks
14+
1315
A [reduction](../../parallel/openmp/reference/openmp-clauses.md#reduction) clause was not specified correctly.
1416

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

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 9ba8a890-d3c7-4cce-93c5-d358e2bfad28
1010

1111
> 'var' : variable in 'reduction' clause must be shared in enclosing context
1212
13+
## Remarks
14+
1315
A variable specified in a [reduction](../../parallel/openmp/reference/openmp-clauses.md#reduction) clause may not be private to each thread in the context.
1416

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

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 140ada3e-5636-43ef-a4ee-22a9f66a771f
1010

1111
> 'var' : variable in 'private' clause cannot be a reduction variable in enclosing context
1212
13+
## Remarks
14+
1315
Variables that appear in the [reduction](../../parallel/openmp/reference/openmp-clauses.md#reduction) clause of a parallel directive cannot be specified in a [private](../../parallel/openmp/reference/openmp-clauses.md#private-openmp) clause on a work-sharing directive that binds to the parallel construct.
1416

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

1721
```cpp

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 02776f16-f57a-4ffd-b7f7-9c696b633e08
1010

1111
> 'var' : index variable in OpenMP 'for' statement cannot be a reduction variable
1212
13+
## Remarks
14+
1315
An index variable is implicitly private, so the variable cannot be used in a [reduction](../../parallel/openmp/reference/openmp-clauses.md#reduction) clause in the enclosing [parallel](../../parallel/openmp/reference/openmp-directives.md#parallel) directive.
1416

1517
## Example

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 29e857ac-74f0-4ec6-becf-9026e38c160e
1010

1111
> 'var' : type of variable in 'reduction' clause is incompatible with reduction operator 'operator'
1212
13+
## Remarks
14+
1315
A variable in a [reduction](../../parallel/openmp/reference/openmp-clauses.md#reduction) clause cannot be used with the reduction operator.
1416

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

1721
```cpp

0 commit comments

Comments
 (0)