diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4002.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4002.md index 18d513c787..be577e0b73 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4002.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4002.md @@ -1,7 +1,7 @@ --- -description: "Learn more about: Compiler Warning (level 1, Error) C4002" title: "Compiler Warning (level 1, Error) C4002" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1, Error) C4002" +ms.date: 11/04/2016 f1_keywords: ["C4002"] helpviewer_keywords: ["C4002"] --- @@ -9,11 +9,15 @@ helpviewer_keywords: ["C4002"] > too many arguments for function-like macro invocation '*identifier*' +## Remarks + The number of actual parameters in the macro exceeds the number of formal parameters in the macro definition. The preprocessor collects the extra parameters but ignores them during macro expansion. C4002 can occur when incorrectly using [variadic macros](../../preprocessor/variadic-macros.md). -The following sample generates C4002: +## Examples + +The following example generates C4002: ```cpp // C4002.cpp diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4003.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4003.md index 360f59e894..45a2adcf25 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4003.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4003.md @@ -1,7 +1,7 @@ --- -description: "Learn more about: Compiler Warning (level 1, Error) C4003" title: "Compiler Warning (level 1, Error) C4003" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1, Error) C4003" +ms.date: 11/04/2016 f1_keywords: ["C4003"] helpviewer_keywords: ["C4003"] --- @@ -9,9 +9,13 @@ helpviewer_keywords: ["C4003"] > not enough arguments for function-like macro invocation '*identifier*' +## Remarks + The number of formal parameters in the macro definition exceeds the number of actual parameters in the macro. Macro expansion substitutes empty text for the missing parameters. -The following sample generates C4003: +## Example + +The following example generates C4003: ```cpp // C4003.cpp diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4005.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4005.md index 53cbf804f6..69a14d6e51 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4005.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4005.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4005" title: "Compiler Warning (level 1) C4005" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1) C4005" +ms.date: 11/04/2016 f1_keywords: ["C4005"] helpviewer_keywords: ["C4005"] -ms.assetid: 7f2dc79a-9fcb-4d5b-be61-120d9cb487ad --- # Compiler Warning (level 1) C4005 -'identifier' : macro redefinition +> 'identifier' : macro redefinition + +## Remarks The macro identifier is defined twice. The compiler uses the second macro definition. @@ -24,7 +25,9 @@ The macro identifier is defined twice. The compiler uses the second macro defini 1. Use an [#undef](../../preprocessor/hash-undef-directive-c-cpp.md) directive before the second definition. -The following sample generates C4005: +## Example + +The following example generates C4005: ```cpp // C4005.cpp diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4006.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4006.md index fead77c55d..c39751f601 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4006.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4006.md @@ -1,16 +1,21 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4006" title: "Compiler Warning (level 1) C4006" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1) C4006" +ms.date: 11/04/2016 f1_keywords: ["C4006"] helpviewer_keywords: ["C4006"] -ms.assetid: f1a59819-0fd2-4361-8e3a-99e4b514b8e1 --- # Compiler Warning (level 1) C4006 -\#undef expected an identifier +> #undef expected an identifier + +## Remarks + +The `#undef` directive did not specify an identifier to undefine. The directive is ignored. To resolve the warning, be sure to specify an identifier. + +## Example -The `#undef` directive did not specify an identifier to undefine. The directive is ignored. To resolve the warning, be sure to specify an identifier. The following sample generates C4006: +The following example generates C4006: ```cpp // C4006.cpp diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4010.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4010.md index 4f3d6f55eb..ae54258c55 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4010.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4010.md @@ -1,20 +1,23 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4010" title: "Compiler Warning (level 1) C4010" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1) C4010" +ms.date: 11/04/2016 f1_keywords: ["C4010"] helpviewer_keywords: ["C4010"] -ms.assetid: d607a9ff-8f8f-45c0-b07b-3b2f439e5485 --- # Compiler Warning (level 1) C4010 -single-line comment contains line-continuation character +> single-line comment contains line-continuation character + +## Remarks A single-line comment, which is introduced by //, contains a backslash (\\) that serves as a line-continuation character. The compiler considers the next line to be a continuation and treats it as a comment. Some syntax-directed editors do not indicate the line following the continuation character as a comment. Ignore syntax coloring on any lines that cause this warning. -The following sample generates C4010: +## Example + +The following example generates C4010: ```cpp // C4010.cpp diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4015.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4015.md index 5ad3ccbb8c..17fcd129fd 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4015.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4015.md @@ -1,13 +1,14 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4015" title: "Compiler Warning (level 1) C4015" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1) C4015" +ms.date: 11/04/2016 f1_keywords: ["C4015"] helpviewer_keywords: ["C4015"] -ms.assetid: 7242ab90-c869-482f-8152-46728575837e --- # Compiler Warning (level 1) C4015 -'identifier' : type of bit field must be integral +> 'identifier' : type of bit field must be integral + +## Remarks The bit field is not declared as an integer type. The compiler assumes the base type of the bit field to be unsigned. Bit fields must be declared as unsigned integer types. diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4020.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4020.md index a5fb74a51a..587b65dc88 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4020.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4020.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4020" title: "Compiler Warning (level 1) C4020" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1) C4020" +ms.date: 11/04/2016 f1_keywords: ["C4020"] helpviewer_keywords: ["C4020"] -ms.assetid: 8c4cd6be-9371-4c8c-b0ff-a5ad367bbab0 --- # Compiler Warning (level 1) C4020 -'function' : too many actual parameters +> 'function' : too many actual parameters + +## Remarks The number of actual parameters in a function call exceeds the number of formal parameters in the function prototype or definition. The compiler passes the extra actual parameters according to the calling convention of the function. -The following sample generates C4020: +## Example + +The following example generates C4020: ```c // C4020.c diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4022.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4022.md index 051feb44a3..ee13a0d21a 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4022.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4022.md @@ -1,13 +1,14 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4022" title: "Compiler Warning (level 1) C4022" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1) C4022" +ms.date: 11/04/2016 f1_keywords: ["C4022"] helpviewer_keywords: ["C4022"] -ms.assetid: 9586ca84-4b40-4602-91a4-2e2415b1ab63 --- # Compiler Warning (level 1) C4022 -'function' : pointer mismatch for actual parameter 'number' +> 'function' : pointer mismatch for actual parameter 'number' + +## Remarks The pointer type of the actual parameter differs from the pointer type of the corresponding formal parameter. The actual parameter is passed without change. diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4024.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4024.md index eb23ea6c5f..f4fb400f3c 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4024.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4024.md @@ -1,13 +1,14 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4024" title: "Compiler Warning (level 1) C4024" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1) C4024" +ms.date: 11/04/2016 f1_keywords: ["C4024"] helpviewer_keywords: ["C4024"] -ms.assetid: f6cb1b70-686a-4747-a01c-de673208209a --- # Compiler Warning (level 1) C4024 -'function' : different types for formal and actual parameter 'number' +> 'function' : different types for formal and actual parameter 'number' + +## Remarks Corresponding formal and actual parameters have different types. The compiler passes the actual parameter without change. The receiving function converts the parameter type to the type expected. diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4025.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4025.md index 505f3d8597..d9c89fd460 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4025.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4025.md @@ -1,13 +1,14 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4025" title: "Compiler Warning (level 1) C4025" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1) C4025" +ms.date: 11/04/2016 f1_keywords: ["C4025"] helpviewer_keywords: ["C4025"] -ms.assetid: c4f6a651-0641-4446-973e-8290065e49ad --- # Compiler Warning (level 1) C4025 -'number' : based pointer passed to function with variable arguments: parameter number +> 'number' : based pointer passed to function with variable arguments: parameter number + +## Remarks Passing a based pointer to a function with variable arguments causes the pointer to be normalized, with unpredictable results. Do not pass based pointers to functions with variable arguments. diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4026.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4026.md index 57b763bec5..4aa8c4d832 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4026.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4026.md @@ -1,13 +1,14 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4026" title: "Compiler Warning (level 1) C4026" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1) C4026" +ms.date: 11/04/2016 f1_keywords: ["C4026"] helpviewer_keywords: ["C4026"] -ms.assetid: 2c8ff616-8d7f-4784-8037-77f8b6a67698 --- # Compiler Warning (level 1) C4026 -function declared with formal parameter list +> function declared with formal parameter list + +## Remarks The function declaration has formal parameters, but the function definition does not. Subsequent calls to this function assume that the function takes no parameters. diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4027.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4027.md index c3a3de1492..cf626d581a 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4027.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4027.md @@ -1,6 +1,6 @@ --- -description: "Learn more about compiler warning (level 1) C4027" title: "Compiler Warning (level 1) C4027" +description: "Learn more about compiler warning (level 1) C4027" ms.date: 12/16/2020 f1_keywords: ["C4027"] helpviewer_keywords: ["C4027"] @@ -9,6 +9,8 @@ helpviewer_keywords: ["C4027"] > function declared without formal parameter list +## Remarks + The function declaration had no formal parameters, but there are formal parameters in the function definition or actual parameters in a call. The compiler accepts, but warns, on an old C-style forward declaration of a function name without a parameter list. On later calls to this function, the compiler assumes that the function takes actual parameters of the types found in the function definition or call. We recommend you modify your function declaration diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4028.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4028.md index abc7bff802..8b090d3b4b 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4028.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4028.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4028" title: "Compiler Warning (level 1) C4028" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1) C4028" +ms.date: 11/04/2016 f1_keywords: ["C4028"] helpviewer_keywords: ["C4028"] -ms.assetid: c3e8b70b-e870-416c-a285-bba5f71dbfc6 --- # Compiler Warning (level 1) C4028 -formal parameter 'number' different from declaration +> formal parameter 'number' different from declaration + +## Remarks The type of the formal parameter does not agree with the corresponding parameter in the declaration. The type in the original declaration is used. @@ -16,7 +17,7 @@ This warning is only valid for C source code. ## Example -The following sample generates C4028. +The following example generates C4028. ```c // C4028.c diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4029.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4029.md index d34c5ff797..fc2983d339 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4029.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4029.md @@ -1,13 +1,14 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4029" title: "Compiler Warning (level 1) C4029" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1) C4029" +ms.date: 11/04/2016 f1_keywords: ["C4029"] helpviewer_keywords: ["C4029"] -ms.assetid: a5c50bab-a189-44c9-aa5c-4377c7c8443a --- # Compiler Warning (level 1) C4029 -declared formal parameter list different from definition +> declared formal parameter list different from definition + +## Remarks Formal parameter types in the function declaration do not agree with those in the function definition. The compiler uses the parameter list from the definition. diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4030.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4030.md index 9440c16897..c36e7b4667 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4030.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4030.md @@ -1,13 +1,14 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4030" title: "Compiler Warning (level 1) C4030" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1) C4030" +ms.date: 11/04/2016 f1_keywords: ["C4030"] helpviewer_keywords: ["C4030"] -ms.assetid: 155b290e-4777-4704-ad35-02968b1e4c5e --- # Compiler Warning (level 1) C4030 -**first formal parameter list longer than the second list** +> first formal parameter list longer than the second list + +## Remarks A function was redeclared with different formal parameters. The compiler uses the formal parameters given in the first declaration. diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4031.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4031.md index d7291b5939..f87f4f40fd 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4031.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4031.md @@ -1,13 +1,14 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4031" title: "Compiler Warning (level 1) C4031" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1) C4031" +ms.date: 11/04/2016 f1_keywords: ["C4031"] helpviewer_keywords: ["C4031"] -ms.assetid: 8ac4965d-75e2-42db-9763-3f6ae707e1e1 --- # Compiler Warning (level 1) C4031 -second formal parameter list longer than the first list +> second formal parameter list longer than the first list + +## Remarks A function is redeclared with different formal parameters. The compiler uses the formal parameters given in the first declaration. diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4033.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4033.md index 9e90e7cd31..0243da6409 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4033.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4033.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4033" title: "Compiler Warning (level 1) C4033" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1) C4033" +ms.date: 11/04/2016 f1_keywords: ["C4033"] helpviewer_keywords: ["C4033"] -ms.assetid: 189a9ec3-ff6d-49dd-b9b2-530b28bbb7c9 --- # Compiler Warning (level 1) C4033 -'function' must return a value +> 'function' must return a value + +## Remarks The function does not return a value. An undefined value is returned. @@ -16,7 +17,9 @@ Functions that use **`return`** without a return value must be declared as type This error is for C language code. -The following sample generates C4033: +## Example + +The following example generates C4033: ```c // C4033.c diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4034.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4034.md index fa3394aaf4..b1f4596f19 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4034.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4034.md @@ -1,13 +1,14 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4034" title: "Compiler Warning (level 1) C4034" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1) C4034" +ms.date: 11/04/2016 f1_keywords: ["C4034"] helpviewer_keywords: ["C4034"] -ms.assetid: 1d2f598d-bdfc-4a95-9617-424b591ed3e8 --- # Compiler Warning (level 1) C4034 -sizeof returns 0 +> sizeof returns 0 + +## Remarks The **`sizeof`** operator is applied to an operand of size zero (an empty structure, union, class, or enumerated type, or type **`void`**). diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4036.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4036.md index 5741b71a91..aa7a3ae06a 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4036.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4036.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4036" title: "Compiler Warning (level 1) C4036" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1) C4036" +ms.date: 11/04/2016 f1_keywords: ["C4036"] helpviewer_keywords: ["C4036"] -ms.assetid: f0b15359-4d62-48ec-8cb1-a7b36587a47f --- # Compiler Warning (level 1) C4036 -unnamed 'type' as actual parameter +> unnamed 'type' as actual parameter + +## Remarks No type name is given for a structure, union, enumeration, or class used as an actual parameter. If you are using [/Zg](../../build/reference/zg-generate-function-prototypes.md) to generate function prototypes, the compiler issues this warning and comments out the formal parameter in the generated prototype. @@ -16,7 +17,7 @@ Specify a type name to resolve this warning. ## Example -The following sample generates C4036. +The following example generates C4036. ```c // C4036.c diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4038.md b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4038.md index 5fefad3f82..1ae8f389ee 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4038.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-1-c4038.md @@ -1,13 +1,14 @@ --- -description: "Learn more about: Compiler Warning (level 1) C4038" title: "Compiler Warning (level 1) C4038" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 1) C4038" +ms.date: 11/04/2016 f1_keywords: ["C4038"] helpviewer_keywords: ["C4038"] -ms.assetid: 54c7f4ed-9386-436e-b4be-bf6c338ded64 --- # Compiler Warning (level 1) C4038 -'modifier' : illegal ambient class modifier +> 'modifier' : illegal ambient class modifier + +## Remarks This modifier cannot be used for classes with **`dllimport`** or [dllexport](../../cpp/dllexport-dllimport.md) attributes. diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-2-c4007.md b/docs/error-messages/compiler-warnings/compiler-warning-level-2-c4007.md index 336918d5ce..b9e5c6c8da 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-2-c4007.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-2-c4007.md @@ -1,7 +1,7 @@ --- -description: "Learn more about: Compiler Warning (level 3) C4007" title: "Compiler Warning (level 3) C4007" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 3) C4007" +ms.date: 11/04/2016 f1_keywords: ["C4007"] helpviewer_keywords: ["C4007"] --- @@ -9,4 +9,6 @@ helpviewer_keywords: ["C4007"] > '*function*': must be '*attribute*' +## Remarks + A required attribute for a function isn't explicitly stated. For example, the function `main` must have the `__cdecl` attribute. The compiler forces the attribute. diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4013.md b/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4013.md index 599a4caf8d..d31e60b758 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4013.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4013.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Warning (level 3) C4013" title: "Compiler Warning (level 3) C4013" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 3) C4013" +ms.date: 11/04/2016 f1_keywords: ["C4013"] helpviewer_keywords: ["C4013"] -ms.assetid: 9f9afc71-6e78-463d-9d66-3012d6a3cd5d --- # Compiler Warning (level 3) C4013 -'function' undefined; assuming extern returning int +> 'function' undefined; assuming extern returning int + +## Remarks The compiler encountered a call to an undefined function. diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4018.md b/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4018.md index 9dd5d2ec50..83dab0c48c 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4018.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4018.md @@ -9,15 +9,15 @@ helpviewer_keywords: ["C4018"] > '*token*' : signed/unsigned mismatch -Using the *token* operator to compare **`signed`** and **`unsigned`** numbers required the compiler to convert the **`signed`** value to **`unsigned`**. - ## Remarks +Using the *token* operator to compare **`signed`** and **`unsigned`** numbers required the compiler to convert the **`signed`** value to **`unsigned`**. + One way to fix this warning is if you cast one of the two types when you compare **`signed`** and **`unsigned`** types. ## Example -This sample generates C4018 and shows how to fix it: +This example generates C4018 and shows how to fix it: ```cpp // C4018.cpp diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4023.md b/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4023.md index af8177c4fa..f11f88a5ed 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4023.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-3-c4023.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Warning (level 3) C4023" title: "Compiler Warning (level 3) C4023" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 3) C4023" +ms.date: 11/04/2016 f1_keywords: ["C4023"] helpviewer_keywords: ["C4023"] -ms.assetid: 615d5374-d7c1-42eb-acfd-917c053270c8 --- # Compiler Warning (level 3) C4023 -'symbol' : based pointer passed to unprototyped function : parameter number +> 'symbol' : based pointer passed to unprototyped function : parameter number + +## Remarks Passing a based pointer to an unprototyped function causes the pointer to be normalized, with unpredictable results. diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4001.md b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4001.md index 73499a4579..f5c0cdd330 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4001.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4001.md @@ -1,7 +1,7 @@ --- -description: "Learn more about: Compiler Warning (level 4, no longer emitted) C4001" title: "Compiler Warning (level 4, no longer emitted) C4001" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 4, no longer emitted) C4001" +ms.date: 11/04/2016 f1_keywords: ["C4001"] helpviewer_keywords: ["C4001"] --- @@ -9,6 +9,8 @@ helpviewer_keywords: ["C4001"] > nonstandard extension 'single line comment' was used +## Remarks + > [!NOTE] > This warning is removed in Visual Studio 2017 version 15.5 because single-line comments are standard in C99. diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4019.md b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4019.md index 60b67551c2..cdb8721b01 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4019.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4019.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Warning (level 4) C4019" title: "Compiler Warning (level 4) C4019" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 4) C4019" +ms.date: 11/04/2016 f1_keywords: ["C4019"] helpviewer_keywords: ["C4019"] -ms.assetid: 4ecfe85d-673f-4334-8154-36fe7f0b3444 --- # Compiler Warning (level 4) C4019 -empty statement at global scope +> empty statement at global scope + +## Remarks A semicolon at global scope isn't preceded by a statement. @@ -19,6 +20,8 @@ This warning may be fixed if you remove the extra semicolon. ## Example +The following example generates C4019: + ```c // C4019.c // compile with: /Za /W4 diff --git a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4032.md b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4032.md index cfe32c9fde..b5e045ee4f 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4032.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-level-4-c4032.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Warning (level 4) C4032" title: "Compiler Warning (level 4) C4032" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (level 4) C4032" +ms.date: 11/04/2016 f1_keywords: ["C4032"] helpviewer_keywords: ["C4032"] -ms.assetid: 70dd0c85-0239-43f9-bb06-507f6a57d206 --- # Compiler Warning (level 4) C4032 -formal parameter 'number' has different type when promoted +> formal parameter 'number' has different type when promoted + +## Remarks The parameter type is not compatible, through default promotions, with the type in a previous declaration. diff --git a/docs/error-messages/compiler-warnings/compiler-warning-levels-2-and-3-c4008.md b/docs/error-messages/compiler-warnings/compiler-warning-levels-2-and-3-c4008.md index fb62ce06ea..0b0adbc889 100644 --- a/docs/error-messages/compiler-warnings/compiler-warning-levels-2-and-3-c4008.md +++ b/docs/error-messages/compiler-warnings/compiler-warning-levels-2-and-3-c4008.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Warning (levels 2 and 3) C4008" title: "Compiler Warning (levels 2 and 3) C4008" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Warning (levels 2 and 3) C4008" +ms.date: 11/04/2016 f1_keywords: ["C4008"] helpviewer_keywords: ["C4008"] -ms.assetid: fb45e535-cb68-4743-80e9-a6e34cfffeca --- # Compiler Warning (levels 2 and 3) C4008 -'identifier' : 'attribute' attribute ignored +> 'identifier' : 'attribute' attribute ignored + +## Remarks The compiler ignored the **`__fastcall`**, **`static`**, or **`inline`** attribute for a function (level 3 warning) or data (level 2 warning).