Skip to content

Commit 77b5a95

Browse files
authored
Merge pull request #5709 from Rageking8/structure-warning-references-in-range-c4081-c4120
Structure warning references in range [C4081, C4120]
2 parents a17e960 + e4ab56a commit 77b5a95

28 files changed

+183
-114
lines changed

docs/error-messages/compiler-warnings/compiler-warning-level-1-c4081.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
---
2-
description: "Learn more about: Compiler Warning (level 1) C4081"
32
title: "Compiler Warning (level 1) C4081"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Warning (level 1) C4081"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C4081"]
66
helpviewer_keywords: ["C4081"]
7-
ms.assetid: 6f656373-a080-4989-bbc9-e2f894b03293
87
---
98
# Compiler Warning (level 1) C4081
109

11-
expected 'token1'; found 'token2'
10+
> expected 'token1'; found 'token2'
11+
12+
## Remarks
1213

1314
The compiler expected a different token in this context.
1415

1516
## Example
1617

18+
The following example generates C4081:
19+
1720
```cpp
1821
// C4081.cpp
1922
// compile with: /W1 /LD

docs/error-messages/compiler-warnings/compiler-warning-level-1-c4083.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
---
2-
description: "Learn more about: Compiler Warning (level 1) C4083"
32
title: "Compiler Warning (level 1) C4083"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Warning (level 1) C4083"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C4083"]
66
helpviewer_keywords: ["C4083"]
7-
ms.assetid: e7d3344e-5645-4d56-8460-d1acc9145ada
87
---
98
# Compiler Warning (level 1) C4083
109

11-
expected 'token'; found identifier 'identifier'
10+
> expected 'token'; found identifier 'identifier'
11+
12+
## Remarks
1213

1314
An identifier occurs in the wrong place in a **#pragma** statement.
1415

1516
## Example
1617

18+
The following example generates C4083:
19+
1720
```cpp
1821
// C4083.cpp
1922
// compile with: /W1 /LD

docs/error-messages/compiler-warnings/compiler-warning-level-1-c4085.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 Warning (level 1) C4085"
32
title: "Compiler Warning (level 1) C4085"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Warning (level 1) C4085"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C4085"]
66
helpviewer_keywords: ["C4085"]
7-
ms.assetid: 2bc6eb25-058f-4597-b351-fd69587b5170
87
---
98
# Compiler Warning (level 1) C4085
109

11-
expected pragma parameter to be 'on' or 'off'
10+
> expected pragma parameter to be 'on' or 'off'
11+
12+
## Remarks
1213

1314
The pragma requires an **on** or **off** parameter. The pragma is ignored.
1415

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

1720
```cpp
1821
// C4085.cpp

docs/error-messages/compiler-warnings/compiler-warning-level-1-c4086.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
---
2-
description: "Learn more about: Compiler Warning (level 1) C4086"
32
title: "Compiler Warning (level 1) C4086"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Warning (level 1) C4086"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C4086"]
66
helpviewer_keywords: ["C4086"]
7-
ms.assetid: 9248831b-22bf-47af-8684-bfadb17e94fc
87
---
98
# Compiler Warning (level 1) C4086
109

11-
expected pragma parameter to be '1', '2', '4', '8', or '16'
10+
> expected pragma parameter to be '1', '2', '4', '8', or '16'
11+
12+
## Remarks
1213

1314
The pragma parameter does not have the required value (1, 2, 4, 8, or 16).
1415

1516
## Example
1617

18+
The following example generates C4086:
19+
1720
```cpp
1821
// C4086.cpp
1922
// compile with: /W1 /LD

docs/error-messages/compiler-warnings/compiler-warning-level-1-c4087.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
---
2-
description: "Learn more about: Compiler Warning (level 1) C4087"
32
title: "Compiler Warning (level 1) C4087"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Warning (level 1) C4087"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C4087"]
66
helpviewer_keywords: ["C4087"]
7-
ms.assetid: 546e4d57-5c8e-422c-8ef1-92657336dad5
87
---
98
# Compiler Warning (level 1) C4087
109

11-
'function' : declared with 'void' parameter list
10+
> 'function' : declared with 'void' parameter list
11+
12+
## Remarks
1213

1314
The function declaration has no formal parameters, but the function call has actual parameters. Extra parameters are passed according to the calling convention of the function.
1415

1516
This warning is for the C compiler.
1617

1718
## Example
1819

20+
The following example generates C4087:
21+
1922
```c
2023
// C4087.c
2124
// compile with: /W1
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
---
2-
description: "Learn more about: Compiler Warning (level 1) C4088"
32
title: "Compiler Warning (level 1) C4088"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Warning (level 1) C4088"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C4088"]
66
helpviewer_keywords: ["C4088"]
7-
ms.assetid: 9bab817c-16b2-4324-be5e-f9cbb06b702e
87
---
98
# Compiler Warning (level 1) C4088
109

11-
'function' : pointer mismatch in actual parameter 'number', formal parameter 'number'
10+
> 'function' : pointer mismatch in actual parameter 'number', formal parameter 'number'
11+
12+
## Remarks
1213

1314
The corresponding formal and actual parameters have a different level of indirection. The actual parameter is passed without change. The called function interprets its value as a pointer.
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
---
2-
description: "Learn more about: Compiler Warning (level 1) C4089"
32
title: "Compiler Warning (level 1) C4089"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Warning (level 1) C4089"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C4089"]
66
helpviewer_keywords: ["C4089"]
7-
ms.assetid: 7c8f929b-9bf9-4063-9b7e-4affd98c1acc
87
---
98
# Compiler Warning (level 1) C4089
109

11-
'function' : different types in actual parameter 'number', formal parameter 'number'
10+
> 'function' : different types in actual parameter 'number', formal parameter 'number'
11+
12+
## Remarks
1213

1314
The corresponding formal and actual parameters have different types. The actual parameter is passed without change. The function casts the actual parameter to the type specified in the function definition.

docs/error-messages/compiler-warnings/compiler-warning-level-1-c4090.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
11
---
2-
description: "Learn more about: Compiler Warning (level 1) C4090"
32
title: "Compiler Warning (level 1) C4090"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Warning (level 1) C4090"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C4090"]
66
helpviewer_keywords: ["C4090"]
7-
ms.assetid: baad469d-23d4-45aa-ad9c-305b32d61e9a
87
---
98
# Compiler Warning (level 1) C4090
109

11-
'operation' : different 'modifier' qualifiers
10+
> 'operation' : different 'modifier' qualifiers
11+
12+
## Remarks
1213

1314
A variable used in an operation is defined with a specified modifier that prevents it from being modified without detection by the compiler. The expression is compiled without modification.
1415

1516
This warning can be caused when a pointer to a **`const`** or **`volatile`** item is assigned to a pointer not declared as pointing to **`const`** or **`volatile`**.
1617

1718
This warning is issued for C programs. In a C++ program, the compiler issues an error: [C2440](../../error-messages/compiler-errors-1/compiler-error-c2440.md).
1819

19-
The following sample generates C4090:
20+
## Example
21+
22+
The following example generates C4090:
2023

2124
```c
2225
// C4090.c

docs/error-messages/compiler-warnings/compiler-warning-level-1-c4091.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
---
2-
description: "Learn more about: Compiler Warning (level 1 and level 2) C4091"
32
title: "Compiler Warning (level 1 and level 2) C4091"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Warning (level 1 and level 2) C4091"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C4091"]
66
helpviewer_keywords: ["C4091"]
77
---
88
# Compiler Warning (level 1 and level 2) C4091
99

1010
> '*keyword*': ignored on left of '*type*' when no variable is declared
1111
12+
## Remarks
13+
1214
The compiler detected a situation where the user probably intended a variable to be declared, but the compiler wasn't able to declare the variable.
1315

1416
## Examples
1517

16-
A **`__declspec`** attribute at the beginning of a user-defined type declaration applies to the variable of that type. C4091 indicates no variable is declared. The following sample generates C4091.
18+
A **`__declspec`** attribute at the beginning of a user-defined type declaration applies to the variable of that type. C4091 indicates no variable is declared. The following example generates C4091.
1719

1820
```cpp
1921
// C4091.cpp
@@ -28,7 +30,7 @@ __declspec(dllimport) class X2 {} varX;
2830
class __declspec(dllimport) X3 {};
2931
```
3032
31-
If an identifier is a typedef, it can't also be a variable name. The following sample generates C4091.
33+
If an identifier is a typedef, it can't also be a variable name. The following example generates C4091.
3234
3335
```cpp
3436
// C4091_b.cpp

docs/error-messages/compiler-warnings/compiler-warning-level-1-c4096.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
---
2-
description: "Learn more about: Compiler Warning (level 1) C4096"
32
title: "Compiler Warning (level 1) C4096"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Warning (level 1) C4096"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C4096"]
66
helpviewer_keywords: ["C4096"]
7-
ms.assetid: abf3cca2-2f21-45d8-b025-6b513b00681e
87
---
98
# Compiler Warning (level 1) C4096
109

11-
'a': interface is not a COM interface; will not be emitted to IDL
10+
> 'a': interface is not a COM interface; will not be emitted to IDL
11+
12+
## Remarks
1213

1314
An interface definition that you may have intended as a COM interface was not defined as a COM interface and therefore will not be emitted to the IDL file.
1415

1516
See [Interface Attributes](../../windows/attributes/interface-attributes.md) for a list attributes that indicate an interface is a COM interface.
1617

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

1922
```cpp
2023
// C4096.cpp

0 commit comments

Comments
 (0)