diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4081.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4081.md index a266ad55b2..fff7ef70ec 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4081.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4081.md @@ -1,19 +1,22 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4081" title: "Compiler Warning (level 1) C4081" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1) C4081" +ms.date: 11/04/2016 f1_keywords: ["C4081"] helpviewer_keywords: ["C4081"] -ms.assetid: 6f656373-a080-4989-bbc9-e2f894b03293 --- # Compiler Warning (level 1) C4081 -expected 'token1'; found 'token2' +> expected 'token1'; found 'token2' + +## Remarks The compiler expected a different token in this context. ## Example +The following example generates C4081: + ```cpp // C4081.cpp // compile with: /W1 /LD diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4083.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4083.md index 87918fc449..2796ab139e 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4083.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4083.md @@ -1,19 +1,22 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4083" title: "Compiler Warning (level 1) C4083" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1) C4083" +ms.date: 11/04/2016 f1_keywords: ["C4083"] helpviewer_keywords: ["C4083"] -ms.assetid: e7d3344e-5645-4d56-8460-d1acc9145ada --- # Compiler Warning (level 1) C4083 -expected 'token'; found identifier 'identifier' +> expected 'token'; found identifier 'identifier' + +## Remarks An identifier occurs in the wrong place in a **#pragma** statement. ## Example +The following example generates C4083: + ```cpp // C4083.cpp // compile with: /W1 /LD diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4085.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4085.md index af90990a22..98a8afd394 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4085.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4085.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4085" title: "Compiler Warning (level 1) C4085" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1) C4085" +ms.date: 11/04/2016 f1_keywords: ["C4085"] helpviewer_keywords: ["C4085"] -ms.assetid: 2bc6eb25-058f-4597-b351-fd69587b5170 --- # Compiler Warning (level 1) C4085 -expected pragma parameter to be 'on' or 'off' +> expected pragma parameter to be 'on' or 'off' + +## Remarks The pragma requires an **on** or **off** parameter. The pragma is ignored. -The following sample generates C4085: +## Example + +The following example generates C4085: ```cpp // C4085.cpp diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4086.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4086.md index 1c8cf29e1b..f64ee27564 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4086.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4086.md @@ -1,19 +1,22 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4086" title: "Compiler Warning (level 1) C4086" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1) C4086" +ms.date: 11/04/2016 f1_keywords: ["C4086"] helpviewer_keywords: ["C4086"] -ms.assetid: 9248831b-22bf-47af-8684-bfadb17e94fc --- # Compiler Warning (level 1) C4086 -expected pragma parameter to be '1', '2', '4', '8', or '16' +> expected pragma parameter to be '1', '2', '4', '8', or '16' + +## Remarks The pragma parameter does not have the required value (1, 2, 4, 8, or 16). ## Example +The following example generates C4086: + ```cpp // C4086.cpp // compile with: /W1 /LD diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4087.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4087.md index 631fbd9d8c..b8d7e4fa76 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4087.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4087.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4087" title: "Compiler Warning (level 1) C4087" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1) C4087" +ms.date: 11/04/2016 f1_keywords: ["C4087"] helpviewer_keywords: ["C4087"] -ms.assetid: 546e4d57-5c8e-422c-8ef1-92657336dad5 --- # Compiler Warning (level 1) C4087 -'function' : declared with 'void' parameter list +> 'function' : declared with 'void' parameter list + +## Remarks 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. @@ -16,6 +17,8 @@ This warning is for the C compiler. ## Example +The following example generates C4087: + ```c // C4087.c // compile with: /W1 diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4088.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4088.md index 743a55b292..24b6a43278 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4088.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4088.md @@ -1,13 +1,14 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4088" title: "Compiler Warning (level 1) C4088" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1) C4088" +ms.date: 11/04/2016 f1_keywords: ["C4088"] helpviewer_keywords: ["C4088"] -ms.assetid: 9bab817c-16b2-4324-be5e-f9cbb06b702e --- # Compiler Warning (level 1) C4088 -'function' : pointer mismatch in actual parameter 'number', formal parameter 'number' +> 'function' : pointer mismatch in actual parameter 'number', formal parameter 'number' + +## Remarks 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. diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4089.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4089.md index c5a33f3524..9089529037 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4089.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4089.md @@ -1,13 +1,14 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4089" title: "Compiler Warning (level 1) C4089" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1) C4089" +ms.date: 11/04/2016 f1_keywords: ["C4089"] helpviewer_keywords: ["C4089"] -ms.assetid: 7c8f929b-9bf9-4063-9b7e-4affd98c1acc --- # Compiler Warning (level 1) C4089 -'function' : different types in actual parameter 'number', formal parameter 'number' +> 'function' : different types in actual parameter 'number', formal parameter 'number' + +## Remarks 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. diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4090.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4090.md index 4bb401cbcb..716f99228f 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4090.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4090.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4090" title: "Compiler Warning (level 1) C4090" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1) C4090" +ms.date: 11/04/2016 f1_keywords: ["C4090"] helpviewer_keywords: ["C4090"] -ms.assetid: baad469d-23d4-45aa-ad9c-305b32d61e9a --- # Compiler Warning (level 1) C4090 -'operation' : different 'modifier' qualifiers +> 'operation' : different 'modifier' qualifiers + +## Remarks 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. @@ -16,7 +17,9 @@ This warning can be caused when a pointer to a **`const`** or **`volatile`** ite 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). -The following sample generates C4090: +## Example + +The following example generates C4090: ```c // C4090.c diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4091.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4091.md index bd1e02649e..100e44a0e1 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4091.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4091.md @@ -1,7 +1,7 @@ --- -description: "Learn more about: Compiler Warning (level 1 and level 2) C4091" title: "Compiler Warning (level 1 and level 2) C4091" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1 and level 2) C4091" +ms.date: 11/04/2016 f1_keywords: ["C4091"] helpviewer_keywords: ["C4091"] --- @@ -9,11 +9,13 @@ helpviewer_keywords: ["C4091"] > '*keyword*': ignored on left of '*type*' when no variable is declared +## Remarks + 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. ## Examples -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. +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. ```cpp // C4091.cpp @@ -28,7 +30,7 @@ __declspec(dllimport) class X2 {} varX; class __declspec(dllimport) X3 {}; ``` -If an identifier is a typedef, it can't also be a variable name. The following sample generates C4091. +If an identifier is a typedef, it can't also be a variable name. The following example generates C4091. ```cpp // C4091_b.cpp diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4096.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4096.md index 1013ef5274..95738c2307 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4096.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4096.md @@ -1,20 +1,23 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4096" title: "Compiler Warning (level 1) C4096" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1) C4096" +ms.date: 11/04/2016 f1_keywords: ["C4096"] helpviewer_keywords: ["C4096"] -ms.assetid: abf3cca2-2f21-45d8-b025-6b513b00681e --- # Compiler Warning (level 1) C4096 -'a': interface is not a COM interface; will not be emitted to IDL +> 'a': interface is not a COM interface; will not be emitted to IDL + +## Remarks 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. See [Interface Attributes](../../windows/attributes/interface-attributes.md) for a list attributes that indicate an interface is a COM interface. -The following sample generates C4096: +## Example + +The following example generates C4096: ```cpp // C4096.cpp diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4097.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4097.md index c9c9d9688d..36cde34b27 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4097.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4097.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4097" title: "Compiler Warning (level 1) C4097" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1) C4097" +ms.date: 11/04/2016 f1_keywords: ["C4097"] helpviewer_keywords: ["C4097"] -ms.assetid: 2525be51-fac2-43b2-b57c-3bbf1a2268f7 --- # Compiler Warning (level 1) C4097 -expected pragma parameter to be 'restore' or 'off' +> expected pragma parameter to be 'restore' or 'off' + +## Remarks A pragma was passed an invalid value. -The following sample generates C4097: +## Example + +The following example generates C4097: ```cpp // C4097.cpp diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4098.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4098.md index 02da792a1f..c90d530b28 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4098.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4098.md @@ -1,13 +1,14 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4098" title: "Compiler Warning (level 1) C4098" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1) C4098" +ms.date: 11/04/2016 f1_keywords: ["C4098"] helpviewer_keywords: ["C4098"] -ms.assetid: 8c8aef1c-1639-44ec-a3dd-c0dfe9aa727d --- # Compiler Warning (level 1) C4098 -'function' : void function returning a value +> 'function' : void function returning a value + +## Remarks A function declared with return type [void](../../cpp/void-cpp.md) has a **`return`** statement that returns a value. The compiler assumes the function returns a value of type **`int`**. diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4103.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4103.md index a61f63ece8..c9365e43be 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4103.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4103.md @@ -1,20 +1,23 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4103" title: "Compiler Warning (level 1) C4103" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1) C4103" +ms.date: 11/04/2016 f1_keywords: ["C4103"] helpviewer_keywords: ["C4103"] -ms.assetid: 9021b514-375e-4d62-b261-ccb06f299e8e --- # Compiler Warning (level 1) C4103 -'filename' : alignment changed after including header, may be due to missing #pragma pack(pop) +> 'filename' : alignment changed after including header, may be due to missing #pragma pack(pop) + +## Remarks Packing affects the layout of classes, and commonly, if packing changes across header files, there can be problems. Use #pragma [pack](../../preprocessor/pack.md)(pop) before exiting the header file to resolve this warning. -The following sample generates C4103: +## Example + +The following example generates C4103: ```cpp // C4103.h diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4109.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4109.md index 3c6de78389..dfa71b61be 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4109.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4109.md @@ -1,19 +1,22 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4109" title: "Compiler Warning (level 1) C4109" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1) C4109" +ms.date: 11/04/2016 f1_keywords: ["C4109"] helpviewer_keywords: ["C4109"] -ms.assetid: 9e8d95c6-e05d-47e0-bd87-78974b3cc06c --- # Compiler Warning (level 1) C4109 -unexpected identifier 'identifier' +> unexpected identifier 'identifier' + +## Remarks The pragma containing the unexpected identifier is ignored. ## Example +The following example generates C4109: + ```cpp // C4109.cpp // compile with: /W1 /LD diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4113.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4113.md index 7a93cc5ec6..336d4c75cb 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4113.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4113.md @@ -1,13 +1,14 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4113" title: "Compiler Warning (level 1) C4113" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1) C4113" +ms.date: 11/04/2016 f1_keywords: ["C4113"] helpviewer_keywords: ["C4113"] -ms.assetid: ec7a7c4a-d2ee-431c-89dc-31b0f9bfd975 --- # Compiler Warning (level 1) C4113 -'identifier1' differs in parameter lists from 'identifier2' +> 'identifier1' differs in parameter lists from 'identifier2' + +## Remarks A function pointer is assigned to another function pointer, but the formal parameter lists of the functions do not agree. The assignment is compiled without modification. diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4114.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4114.md index ef6514ddde..57c02abc3a 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4114.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4114.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4114" title: "Compiler Warning (level 1) C4114" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1) C4114" +ms.date: 11/04/2016 f1_keywords: ["C4114"] helpviewer_keywords: ["C4114"] -ms.assetid: 3983e1c6-e8bb-46dc-8894-e1827db48797 --- # Compiler Warning (level 1) C4114 -same type qualifier used more than once +> same type qualifier used more than once + +## Remarks A type declaration or definition uses a type qualifier (**`const`**, **`volatile`**, **`signed`**, or **`unsigned`**) more than once. This causes a warning with Microsoft extensions (/Ze) and an error under ANSI compatibility (/Za). -The following sample generates C4114: +## Examples + +The following example generates C4114: ```cpp // C4114.cpp @@ -20,7 +23,7 @@ The following sample generates C4114: volatile volatile int i; // C4114 ``` -The following sample generates C4114: +The following example generates C4114: ```cpp // C4114_b.cpp diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4116.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4116.md index 4c64a7d9d0..b650d74084 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4116.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4116.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4116" title: "Compiler Warning (level 1) C4116" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1) C4116" +ms.date: 11/04/2016 f1_keywords: ["C4116"] helpviewer_keywords: ["C4116"] -ms.assetid: 25434ef3-061e-4252-91a5-0fe2a4b2ffb3 --- # Compiler Warning (level 1) C4116 -unnamed type definition in parentheses +> unnamed type definition in parentheses + +## Remarks A structure, union, or enumerated type with no name is defined in a parenthetical expression. The type definition is meaningless. diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4117.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4117.md index 1b76610289..8355fc6923 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4117.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4117.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4117" title: "Compiler Warning (level 1) C4117" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1) C4117" +ms.date: 11/04/2016 f1_keywords: ["C4117"] helpviewer_keywords: ["C4117"] -ms.assetid: c45aa281-4cc1-4dfd-bd32-bd7a60ddd577 --- # Compiler Warning (level 1) C4117 -macro name 'name' is reserved; 'Command' ignored +> macro name 'name' is reserved; 'Command' ignored + +## Remarks ### To fix by checking the following possible causes @@ -16,7 +17,9 @@ macro name 'name' is reserved; 'Command' ignored 1. Trying to define or undefine the preprocessor operator **defined**. -The following sample generates C4117: +## Example + +The following example generates C4117: ```cpp // C4117.cpp diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4119.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4119.md index 6734a6e402..4cdf1d4876 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4119.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4119.md @@ -1,13 +1,14 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4119" title: "Compiler Warning (level 1) C4119" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1) C4119" +ms.date: 11/04/2016 f1_keywords: ["C4119"] helpviewer_keywords: ["C4119"] -ms.assetid: 0052ce92-033a-4dce-a11e-b7388f4f5c2b --- # Compiler Warning (level 1) C4119 -different bases 'base1' and 'base2' specified +> different bases 'base1' and 'base2' specified + +## Remarks Two based pointers are incompatible because they have different bases. The compiler cannot convert between them. diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4120.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4120.md index 65f329119b..04227416fd 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4120.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4120.md @@ -1,13 +1,14 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4120" title: "Compiler Warning (level 1) C4120" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1) C4120" +ms.date: 11/04/2016 f1_keywords: ["C4120"] helpviewer_keywords: ["C4120"] -ms.assetid: 9faa9265-34b4-41dd-b7a2-e2f3969b1d91 --- # Compiler Warning (level 1) C4120 -based/unbased mismatch +> based/unbased mismatch + +## Remarks The compiler cannot convert between the two pointers because one is based and the other is not. diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-2-c4094.md b/docs/error-messages/compiler-warnings/compiler-warning-level-2-c4094.md index fe8f42e400..aa4ef8419c 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-2-c4094.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-2-c4094.md @@ -1,19 +1,22 @@ --- -description: "Learn more about: Compiler Warning (level 2) C4094" title: "Compiler Warning (level 2) C4094" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 2) C4094" +ms.date: 11/04/2016 f1_keywords: ["C4094"] helpviewer_keywords: ["C4094"] -ms.assetid: e68929fb-3a1c-4be7-920b-d5f79f534f99 --- # Compiler Warning (level 2) C4094 -untagged 'token' declared no symbols +> untagged 'token' declared no symbols + +## Remarks The compiler detected an empty declaration using an untagged structure, union, or class. The declaration is ignored. ## Example +The following example generates C4094: + ```cpp // C4094.cpp // compile with: /W2 diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-2-c4099.md b/docs/error-messages/compiler-warnings/compiler-warning-level-2-c4099.md index 813ec5943a..1739a47480 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-2-c4099.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-2-c4099.md @@ -1,7 +1,7 @@ --- title: "Compiler Warning (level 2) C4099" description: "Learn more about: Compiler Warning (level 2) C4099" -ms.date: "11/04/2016" +ms.date: 11/04/2016 f1_keywords: ["C4099"] helpviewer_keywords: ["C4099"] --- @@ -9,11 +9,13 @@ helpviewer_keywords: ["C4099"] > '*identifier*': type name first seen using '*object_type1*' now seen using '*object_type2*' +## Remarks + An object declared as a structure is defined as a class, or an object declared as a class is defined as a structure. The compiler uses the type given in the definition. ## Example -The following sample generates C4099. +The following example generates C4099. ```cpp // C4099.cpp diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4101.md b/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4101.md index 3199f6c3e5..bf61764db5 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4101.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4101.md @@ -1,7 +1,7 @@ --- -description: "Learn more about: Compiler Warning (level 3 and level 4) C4101" title: "Compiler Warning (level 3 and level 4) C4101" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 3 and level 4) C4101" +ms.date: 11/04/2016 f1_keywords: ["C4101"] helpviewer_keywords: ["C4101"] --- @@ -9,7 +9,13 @@ helpviewer_keywords: ["C4101"] > '*identifier*': unreferenced local variable -The local variable is never used. This warning occurs in the obvious situation: +## Remarks + +The local variable is never used. + +## Examples + +This warning occurs in the obvious situation: ```cpp // C4101a.cpp diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4102.md b/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4102.md index 379c3a7b12..63b13fa15f 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4102.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4102.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Warning (level 3) C4102" title: "Compiler Warning (level 3) C4102" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 3) C4102" +ms.date: 11/04/2016 f1_keywords: ["C4102"] helpviewer_keywords: ["C4102"] -ms.assetid: 349f308a-daf3-48c6-bd53-6c38b73f8880 --- # Compiler Warning (level 3) C4102 -'label' : unreferenced label +> 'label' : unreferenced label + +## Remarks The label is defined but never referenced. The compiler ignores the label. -The following sample generates C4102: +## Example + +The following example generates C4102: ```cpp // C4102.cpp diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4092.md b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4092.md index 5f3cc5c9b6..d926a41d76 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4092.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4092.md @@ -1,13 +1,14 @@ --- -description: "Learn more about: Compiler Warning (level 4) C4092" title: "Compiler Warning (level 4) C4092" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 4) C4092" +ms.date: 11/04/2016 f1_keywords: ["C4092"] helpviewer_keywords: ["C4092"] -ms.assetid: 396ae826-a892-4327-bd66-f4762376d72b --- # Compiler Warning (level 4) C4092 > sizeof returns 'unsigned long' +## Remarks + The operand of the **`sizeof`** operator was very large, so **`sizeof`** returned an **`unsigned long`**. This warning occurs under the Microsoft extensions ([`/Ze`](../../build/reference/za-ze-disable-language-extensions.md)). Under ANSI compatibility (**`/Za`**), the result is truncated instead. diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4100.md b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4100.md index b4b8cfae66..c0b6b54f40 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4100.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4100.md @@ -1,6 +1,6 @@ --- -description: "Learn more about: Compiler Warning (level 4) C4100" title: "Compiler Warning (level 4) C4100" +description: "Learn more about: Compiler Warning (level 4) C4100" ms.date: 04/22/2025 f1_keywords: ["C4100"] helpviewer_keywords: ["C4100"] @@ -9,11 +9,15 @@ helpviewer_keywords: ["C4100"] > 'identifier' : unreferenced formal parameter +## Remarks + The formal parameter is not referenced in the body of the function. The unreferenced parameter is ignored. C4100 can also be issued when code calls a destructor on an otherwise unreferenced parameter of primitive type. -The following sample generates C4100: +## Example + +The following example generates C4100: ```cpp // C4100.cpp diff --git a/docs/error-messages/compiler-warnings/compiler-warning-levels-1-and-4-c4112.md b/docs/error-messages/compiler-warnings/compiler-warning-levels-1-and-4-c4112.md index 6dc4a888be..96a81a8c9a 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-levels-1-and-4-c4112.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-levels-1-and-4-c4112.md @@ -1,7 +1,7 @@ --- -description: "Learn more about: Compiler Warning (level 1 and level 4) C4112" title: "Compiler Warning (level 1 and level 4) C4112" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1 and level 4) C4112" +ms.date: 11/04/2016 f1_keywords: ["C4112"] helpviewer_keywords: ["C4112"] --- @@ -9,11 +9,15 @@ helpviewer_keywords: ["C4112"] > `#line` requires an integer between 1 and '*line_count*' +## Remarks + The [#line](../../preprocessor/hash-line-directive-c-cpp.md) directive specifies an integer parameter that is outside the allowable range. If the specified parameter is less than 1, the line counter is reset to 1. If the specified parameter is greater than *number*, which is the compiler-defined limit, the line counter is unchanged. This diagnostic is a level 1 warning under ANSI C compatibility ([/Za](../../build/reference/za-ze-disable-language-extensions.md)) and a level 4 warning with Microsoft extensions ([/Ze](../../build/reference/za-ze-disable-language-extensions.md)). -The following sample generates C4112: +## Example + +The following example generates C4112: ```cpp // C4112.cpp diff --git a/docs/error-messages/compiler-warnings/compiler-warning-levels-1-and-4-c4115.md b/docs/error-messages/compiler-warnings/compiler-warning-levels-1-and-4-c4115.md index d881c7f2c1..34868cd319 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-levels-1-and-4-c4115.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-levels-1-and-4-c4115.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Warning (levels 1 and 4) C4115" title: "Compiler Warning (levels 1 and 4) C4115" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (levels 1 and 4) C4115" +ms.date: 11/04/2016 f1_keywords: ["C4115"] helpviewer_keywords: ["C4115"] -ms.assetid: f3f94e72-fc49-4d09-b3e7-23d68e61152f --- # Compiler Warning (levels 1 and 4) C4115 -'type' : named type definition in parentheses +> 'type' : named type definition in parentheses + +## Remarks The given symbol is used to define a structure, union, or enumerated type inside a parenthetical expression. The scope of the definition may be unexpected.