Skip to content

Commit 75297bc

Browse files
authored
Merge pull request MicrosoftDocs#5552 from Rastaban/docs-editor/compiler-warnings-c4200-throug-1713469625
Update compiler-warnings-c4200-through-c4399.md
2 parents 22542b7 + 15055f4 commit 75297bc

18 files changed

+128
-145
lines changed

docs/error-messages/compiler-warnings/compiler-warning-c4355.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
---
2-
description: "Learn more about: Compiler Warning C4355"
3-
title: "Compiler Warning C4355"
2+
description: "Learn more about: Compiler Warning (level 1 and level 4, off) C4355"
3+
title: "Compiler Warning (level 1 and level 4, off) C4355"
44
ms.date: "11/04/2016"
55
f1_keywords: ["C4355"]
66
helpviewer_keywords: ["C4355"]
7-
ms.assetid: b819ecab-8a07-42d7-8fa4-1180d51626c0
87
---
9-
# Compiler Warning C4355
8+
# Compiler Warning (level 1 and level 4, off) C4355
109

11-
'this' : used in base member initializer list
10+
> '`this`': used in base member initializer list
1211
13-
The **`this`** pointer is valid only within nonstatic member functions. It cannot be used in the initializer list for a base class.
12+
The `this` pointer is valid only within nonstatic member functions. It can't be used in the initializer list for a base class.
1413

15-
The base-class constructors and class member constructors are called before **`this`** constructor. In effect, you've passed a pointer to an unconstructed object to another constructor. If those other constructors access any members or call member functions on this, the result will be undefined. You should not use the **`this`** pointer until all construction has completed.
14+
The base-class constructors and class member constructors are called before `this` constructor. This pattern is the same as passing a pointer to an unconstructed object to another constructor. If those other constructors access any members or call member functions on `this`, the result is undefined. You shouldn't use the `this` pointer until all construction is complete.
1615

17-
This warning is off by default. See [Compiler Warnings That Are Off by Default](../../preprocessor/compiler-warnings-that-are-off-by-default.md) for more information.
16+
This warning is off by default. For more information, see [Compiler Warnings That Are Off by Default](../../preprocessor/compiler-warnings-that-are-off-by-default.md).
1817

1918
The following sample generates C4355:
2019

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
---
2-
description: "Learn more about: Compiler Warning (level 1) C4218"
3-
title: "Compiler Warning (level 1) C4218"
2+
description: "Learn more about: Compiler Warning (level 4) C4218"
3+
title: "Compiler Warning (level 4) C4218"
44
ms.date: "11/04/2016"
55
f1_keywords: ["C4218"]
66
helpviewer_keywords: ["C4218"]
7-
ms.assetid: d6c3cd90-4518-49e9-ae86-4ba9e2761d98
87
---
9-
# Compiler Warning (level 1) C4218
8+
# Compiler Warning (level 4) C4218
109

11-
nonstandard extension used : must specify at least a storage class or a type
10+
> nonstandard extension used: must specify at least a storage class or a type
1211
13-
With the default Microsoft extensions (/Ze), you can declare a variable without specifying a type or storage class. The default type is **`int`**.
12+
With the default Microsoft extensions (`/Ze`), you can declare a variable without specifying a type or storage class. The default type is **`int`**.
1413

1514
## Example
1615

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
---
2-
description: "Learn more about: Compiler Warning (level 1) C4229"
3-
title: "Compiler Warning (level 1) C4229"
2+
description: "Learn more about: Compiler Warning (level 1, Error) C4229"
3+
title: "Compiler Warning (level 1, Error) C4229"
44
ms.date: "11/04/2016"
55
f1_keywords: ["C4229"]
66
helpviewer_keywords: ["C4229"]
7-
ms.assetid: aadfc83b-1e5f-4229-bd0a-9c10a5d13182
87
---
9-
# Compiler Warning (level 1) C4229
8+
# Compiler Warning (level 1, Error) C4229
109

11-
anachronism used : modifiers on data are ignored
10+
> anachronism used: modifiers on data are ignored
1211
1312
Using a Microsoft modifier such as **`__cdecl`** on a data declaration is an outdated practice.
1413

@@ -17,5 +16,5 @@ Using a Microsoft modifier such as **`__cdecl`** on a data declaration is an out
1716
```cpp
1817
// C4229.cpp
1918
// compile with: /W1 /LD
20-
int __cdecl counter; // C4229 cdecl ignored
19+
int __cdecl counter; // C4229
2120
```

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
2-
description: "Learn more about: Compiler Warning (level 1) C4251"
3-
title: "Compiler Warning (level 1) C4251"
2+
description: "Learn more about: Compiler Warning (level 2) C4251"
3+
title: "Compiler Warning (level 2) C4251"
44
ms.date: 12/01/2023
55
f1_keywords: ["C4251"]
66
helpviewer_keywords: ["C4251"]
77
---
8-
# Compiler Warning (level 1) C4251
8+
# Compiler Warning (level 2) C4251
99

1010
> '*type*' : class '*type1*' needs to have dll-interface to be used by clients of class '*type2*'
1111

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
2-
description: "Learn more about: Compiler Warning (level 1) C4305"
3-
title: "Compiler Warning (level 1) C4305"
2+
description: "Learn more about: Compiler Warning (level 1 and level 2 and level 4) C4305"
3+
title: "Compiler Warning (level 1 and level 2 and level 4) C4305"
44
ms.date: "01/17/2018"
55
f1_keywords: ["C4305"]
66
helpviewer_keywords: ["C4305"]
77
---
88
# Compiler Warning (level 1) C4305
99

10-
> '*context*' : truncation from '*type1*' to '*type2*'
10+
> '*conversion*': truncation from '*type1*' to '*type2*'
1111
1212
## Remarks
1313

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@ title: "Compiler Warning (level 1) C4329"
44
ms.date: "11/04/2016"
55
f1_keywords: ["C4329"]
66
helpviewer_keywords: ["C4329"]
7-
ms.assetid: 4316f51a-2c56-4b3f-831e-65d24b83b65c
87
---
98
# Compiler Warning (level 1) C4329
109

11-
__declspec(align()) is ignored on enum
10+
> alignment specifier is ignored on enum
1211
13-
Use of the [align](../../cpp/align-cpp.md) keyword of the [__declspec](../../cpp/declspec.md) modifier is not allowed on an **`enum`**. The following sample generates C4329:
12+
Use of the alignment specifiers on `enum` isn't allowed. This pattern includes the use of the [`align`](../../cpp/align-cpp.md) [`__declspec`](../../cpp/declspec.md) modifier. The following sample generates C4329:
1413

1514
```cpp
1615
// C4329.cpp

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@ title: "Compiler Warning (level 1) C4384"
44
ms.date: "11/04/2016"
55
f1_keywords: ["C4384"]
66
helpviewer_keywords: ["C4384"]
7-
ms.assetid: fafa8eb2-cbfc-4edb-8b0f-511ff5d37ac0
87
---
98
# Compiler Warning (level 1) C4384
109

11-
\#pragma 'make_public' should only be used at global scope
10+
> `#pragma` '*pragma_name*' should only be used at global scope
1211
13-
The [make_public](../../preprocessor/make-public.md) pragma was applied incorrectly.
12+
A `pragma` directive that must be applied at a global scope, was found in a different scope.
13+
14+
The warning applies to the following `pragma` directives:
15+
* [`detect_mismatch`](../../preprocessor/detect-mismatch.md)
16+
* `extern_absolute`
17+
* [`make_public`](../../preprocessor/make-public.md)
1418

1519
## Example
1620

docs/error-messages/compiler-warnings/compiler-warning-level-3-c4265.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ helpviewer_keywords: ["C4265"]
77
---
88
# Compiler Warning (level 3, off) C4265
99

10-
> 'class' : class has virtual functions, but destructor is not virtual
10+
> '*classname*': class has virtual functions, but its non-trivial destructor is not virtual; instances of this class may not be destructed correctly
1111
1212
When a class has virtual functions but a nonvirtual destructor, objects of the type might not be destroyed properly when the class is destroyed through a base class pointer.
1313

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
---
2-
description: "Learn more about: Compiler Warning (level 3) C4306"
3-
title: "Compiler Warning (level 3) C4306"
2+
description: "Learn more about: Compiler Warning (level 4) C4306"
3+
title: "Compiler Warning (level 4) C4306"
44
ms.date: "08/27/2018"
55
f1_keywords: ["C4306"]
66
helpviewer_keywords: ["C4306"]
7-
ms.assetid: 5b2192d7-402d-4b6d-8619-08105e7dcac7
87
---
9-
# Compiler Warning (level 3) C4306
8+
# Compiler Warning (level 4) C4306
109

11-
> '*identifier*' : conversion from '*type1*' to '*type2*' of greater size
10+
> '*conversion*': conversion from '*type1*' to '*type2*' of greater size
1211
13-
The identifier is type cast to a larger pointer. The unfilled high bits of the new type will be zero-filled.
12+
The identifier is type cast to a larger pointer. The unfilled high bits of the new type are zero-filled.
1413

1514
This warning may indicate an unwanted conversion. The resulting pointer may not be valid.

docs/error-messages/compiler-warnings/compiler-warning-level-3-c4310.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
description: "Learn more about: Compiler Warning (level 4) C4310"
3-
title: "Compiler Warning (level 3) C4310"
3+
title: "Compiler Warning (level 4) C4310"
44
ms.date: 10/17/2023
55
f1_keywords: ["C4310"]
66
helpviewer_keywords: ["C4310"]
77
---
88
# Compiler Warning (level 4) C4310
99

10-
cast truncates constant value
10+
> cast truncates constant value
1111
1212
A constant value is cast to a smaller type. The compiler performs the cast, which truncates data. The following sample generates C4310:
1313

0 commit comments

Comments
 (0)