Skip to content

Commit b0a2b5c

Browse files
authored
Add "Remarks" and "Example" headings for error references in range [C2701, C2730]
1 parent 8e1983e commit b0a2b5c

23 files changed

+70
-2
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 31cf2ab7-ced9-4f75-aa51-e169e20407fb
1010

1111
> 'function': a function template cannot be a `friend` of a local class
1212
13+
## Remarks
14+
1315
A local class can't have a function template as a `friend` function.
1416

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

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 6def15d4-9a8d-43e7-ae35-42d7cb57c27e
1010

1111
> `__except` may not appear in termination block
1212
13+
## Remarks
14+
1315
An exception handler (**`__try`**/**`__except`**) cannot be nested inside a **`__finally`** block.
1416

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

1721
```cpp

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ ms.assetid: 185797e2-55b5-4c11-8493-e70eb1d15a94
1010

1111
> 'identifier' : __va_start intrinsic only allowed in varargs
1212
13+
## Remarks
14+
1315
The `__va_start` intrinsic is used in a declaration for a function with a fixed number of arguments.

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: e18da924-c42d-4b09-8e29-f4e0382d7dc6
1010

1111
> illegal `__except` without matching `__try` (missing '}' in `__try` block?)
1212
13+
## Remarks
14+
1315
The compiler did not find a closing brace for a **`__try`** block.
1416

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

1721
```cpp

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 3deaf45c-74da-4c9d-acc6-b82412720b74
1010

1111
> 'identifier' : bad context for intrinsic function
1212
13+
## Remarks
14+
1315
Structured exception-handling intrinsics are invalid in certain contexts:
1416

1517
- `_exception_code()` outside an exception filter or **`__except`** block

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: d52d3088-1141-42f4-829c-74755a7fcc3a
1010

1111
> 'identifier' : actual parameters length in bytes differs from previous call or reference
1212
13+
## Remarks
14+
1315
A [__stdcall](../../cpp/stdcall.md) function must be preceded by a prototype. Otherwise, the compiler interprets the first call to the function as a prototype and this error occurs when the compiler encounters a call that does not match.
1416

1517
To fix this error add a function prototype.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ ms.assetid: e66fc7e6-0e91-4b99-a6e0-fdb069b09fbc
1010

1111
> 'identifier' : formal parameter's length in bytes differs from previous declaration
1212
13+
## Remarks
14+
1315
The signature in a call to the specified function differs from the prototype.

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: a2a6bb5b-86ad-4a6c-acd0-e2bef8464e0e
1010

1111
> 'construct' : '__declspec(modifier)' can only be applied to a function returning a pointer
1212
13+
## Remarks
14+
1315
A function whose return value is a pointer is the only construct to which `modifier` can be applied.
1416

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

1721
```cpp

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 9df9f808-7419-4e63-abdd-e6538ff0871f
1010

1111
> 'function' : this function cannot be compiled as managed, consider using #pragma unmanaged
1212
13+
## Remarks
14+
1315
Some instructions will prevent the compiler from generating MSIL for the enclosing function.
1416

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

1721
```cpp

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ ms.assetid: bae9bee3-b4b8-4be5-b6a5-02df587a7278
1010

1111
> only one form of exception handling permitted per function
1212
13+
## Remarks
14+
1315
You can't use structured exception handling (**`__try`**/**`__except`**) and C++ exception handling (**`try`**/**`catch`**) in the same function.

0 commit comments

Comments
 (0)