Skip to content

Commit 21992ab

Browse files
author
Colin Robertson
authored
Merge pull request #2483 from MicrosoftDocs/FromPublicMasterBranch
Confirm merge from FromPublicMasterBranch to master to sync with https://github.com/MicrosoftDocs/cpp-docs (branch master)
2 parents a02fff8 + 43edd26 commit 21992ab

File tree

60 files changed

+67
-67
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+67
-67
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ For additional information about common causes of warning C4311, see [Common Com
1515

1616
The following code example generates C4311 when compiled for a 64-bit target, and then demonstrates how to fix it:
1717

18-
```
18+
```cpp
1919
// C4311.cpp
2020
// compile by using: cl /W1 C4311.cpp
2121
int main() {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ This warning is only issued for 64-bit compilation targets. For more information
1717

1818
The following code example generates C4312 when it is compiled for 64-bit targets:
1919

20-
```
20+
```cpp
2121
// C4312.cpp
2222
// compile by using: cl /W1 /LD C4312.cpp
2323
void* f(int i) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ There is a conflict between the format specified and the value that you are pass
1515

1616
The following code sample generates C4313 when it is compiled for a 64-bit target.
1717

18-
```
18+
```cpp
1919
// C4313.cpp
2020
// Compile by using: cl /W1 C4313.cpp
2121
#include <stdio.h>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ __declspec(align()) is ignored on enum
1111

1212
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:
1313

14-
```
14+
```cpp
1515
// C4329.cpp
1616
// compile with: /W1 /LD
1717
enum __declspec(align(256)) TestEnum { // C4329

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ A right shift operation was too large an amount. All significant bits are shift
1515

1616
The following sample generates C4333.
1717

18-
```
18+
```cpp
1919
// C4333.cpp
2020
// compile with: /c /W1
2121
unsigned shift8 (unsigned char c) {

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The [typename](../../cpp/typename.md) keyword is required if a dependent name is
1313

1414
The following sample generates C4346:
1515

16-
```
16+
```cpp
1717
// C4346.cpp
1818
// compile with: /WX /LD
1919
template<class T>
@@ -26,7 +26,7 @@ struct C {
2626
2727
The following samples shows other examples where the **typename** keyword is required:
2828
29-
```
29+
```cpp
3030
// C4346b.cpp
3131
// compile with: /LD /W1
3232
template<class T>
@@ -47,7 +47,7 @@ struct M : public L<typename T::Type, T::Value>
4747

4848
and this,
4949

50-
```
50+
```cpp
5151
// C4346c.cpp
5252
// compile with: /LD /WX
5353
struct Y {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ A template parameter was redefined.
1313

1414
The following sample generates C4348:
1515

16-
```
16+
```cpp
1717
// C4348.cpp
1818
// compile with: /LD /W1
1919
template <class T=int> struct A; // forward declaration

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ You cannot use the constant zero (0) as a function expression. For more informat
1313

1414
The following sample generates C4353:
1515

16-
```
16+
```cpp
1717
// C4353.cpp
1818
// compile with: /W1
1919
void MyPrintf(void){};

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Two delegates were combined and the return value is not void. If two delegates w
1313

1414
The following sample generates C4358:
1515

16-
```
16+
```cpp
1717
// C4358.cpp
1818
// compile with: /clr /W1
1919
delegate int D();

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ For more information, see [Friend Assemblies (C++)](../../dotnet/friend-assembli
1717

1818
The following sample creates a component.
1919

20-
```
20+
```cpp
2121
// C4364.cpp
2222
// compile with: /clr /LD
2323
ref class A {};
@@ -27,7 +27,7 @@ ref class A {};
2727
2828
The following sample generates C4364.
2929
30-
```
30+
```cpp
3131
// C4364_b.cpp
3232
// compile with: /clr /W1 /c
3333
#using " C4364.dll"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ An enumerator was calculated to be greater than the greatest value for the speci
1515

1616
The following sample generates C4369.
1717

18-
```
18+
```cpp
1919
// C4369.cpp
2020
// compile with: /W1
2121
int main() {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The compiler expected to find the [virtual](../../cpp/virtual-specifier.md) keyw
1313

1414
The following sample generates C4374:
1515

16-
```
16+
```cpp
1717
// C4374.cpp
1818
// compile with: /clr /W1 /c /WX
1919
public interface class I {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ For more information on specifying type and member accessibility in metadata, se
1515

1616
The following sample generates C4376.
1717

18-
```
18+
```cpp
1919
// C4376.cpp
2020
// compile with: /clr /W1 /c
2121
public ref class G {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ All types, native and CLR, are now private by default in an assembly, so **/d1Pr
1717

1818
The following sample generates C4377.
1919

20-
```
20+
```cpp
2121
// C4377.cpp
2222
// compile with: /clr /d1PrivateNativeTypes /W1
2323
// C4377 warning expected

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Under **/clr**, initializer symbols contain function tokens, not functions point
1515

1616
The following sample generates C4378.
1717

18-
```
18+
```cpp
1919
// C4378.cpp
2020
// compile with: /W1 /clr /c
2121
typedef void (__cdecl *PF)(void);
@@ -59,7 +59,7 @@ int main () {
5959
6060
The following sample shows how to resolve C4378.
6161
62-
```
62+
```cpp
6363
// C4378_b.cpp
6464
// compile with: /clr
6565
#pragma warning(disable:4378)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Also, an instance operator is not available to other language compilers via refe
1919

2020
The following sample generates C4383.
2121

22-
```
22+
```cpp
2323
// C4383.cpp
2424
// compile with: /clr /W1
2525

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The [make_public](../../preprocessor/make-public.md) pragma was applied incorrec
1515

1616
The following sample generates C4384.
1717

18-
```
18+
```cpp
1919
// C4384.cpp
2020
// compile with: /c /W1
2121
namespace n {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ To fix this warning, either correct the declaration or delete the declaration an
1515

1616
The following sample generates C4391:
1717

18-
```
18+
```cpp
1919
// C4391.cpp
2020
// compile with: /W1
2121
// processor: x86

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ To fix this warning, either correct the declaration or delete the declaration an
1515

1616
The following sample generates C4392:
1717

18-
```
18+
```cpp
1919
// C4392.cpp
2020
// compile with: /W1
2121
// processor: x86

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ A [literal](../../extensions/literal-cpp-component-extensions.md) data member wa
1313

1414
The following sample generates C4393:
1515

16-
```
16+
```cpp
1717
// C4393.cpp
1818
// compile with: /clr /W1 /c
1919
ref struct Y1 {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ A member function was called on an [initonly (C++/CLI)](../../dotnet/initonly-cp
1313

1414
The following sample generates C4395:
1515

16-
```
16+
```cpp
1717
// C4395.cpp
1818
// compile with: /W1 /clr
1919
public value class V {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ DefaultCharSetAttribute is ignored
1515

1616
The following sample generates C4397.
1717

18-
```
18+
```cpp
1919
// C4397.cpp
2020
// compile with: /W1 /c /clr
2121
using namespace System;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Inline assembly code tries to access a bit-field member. Inline assembly cannot
1313

1414
To avoid this warning, cast the bit field to an appropriate type before making the reference in inline assembly code. The following sample generates C4401:
1515

16-
```
16+
```cpp
1717
// C4401.cpp
1818
// compile with: /W1
1919
// processor: x86

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ms.assetid: 155c64d6-58ae-4455-b61f-ccd711c5da96
1111

1212
A word reserved for inline assembly is used as a variable name. This may cause unpredictable results. To fix this warning, avoid naming variables with words reserved for inline assembly. The following sample generates C4405:
1313

14-
```
14+
```cpp
1515
// C4405.cpp
1616
// compile with: /W1
1717
// processor: x86

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ C4407 can occur if you cast between a multiple inheritance pointer-to-member to
1717

1818
The following sample generates C4407:
1919

20-
```
20+
```cpp
2121
// C4407.cpp
2222
// compile with: /W1 /c
2323
struct C1 {};

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ An attempt to change the calling convention was ignored.
1313

1414
The following sample generates C4440:
1515

16-
```
16+
```cpp
1717
// C4440.cpp
1818
// compile with: /W1 /LD /clr
1919
typedef void __clrcall F();

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Member functions in managed user-defined types and global function generics must
1515

1616
The following sample generates C4441.
1717

18-
```
18+
```cpp
1919
// C4441.cpp
2020
// compile with: /clr /W1 /c
2121
generic <class ItemType>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ For more information, see [Destructors and finalizers](../../dotnet/how-to-defin
1919

2020
The following sample generates C4461.
2121

22-
```
22+
```cpp
2323
// C4461.cpp
2424
// compile with: /W1 /clr /c
2525
ref class A {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ have no effect under [/clr](../../build/reference/clr-common-language-runtime-co
2121

2222
The following sample generates C4470:
2323

24-
```
24+
```cpp
2525
// C4470.cpp
2626
// compile with: /clr /W1 /LD
2727
#pragma float_control(except, on) // C4470

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Since a private virtual member function of a managed class or struct cannot be a
1515

1616
The following sample generates C4486.
1717

18-
```
18+
```cpp
1919
// C4486.cpp
2020
// compile with: /clr /c /W1
2121
ref class B {
@@ -29,7 +29,7 @@ private:
2929
3030
The following sample shows one possible use of a private sealed, virtual function.
3131
32-
```
32+
```cpp
3333
// C4486_b.cpp
3434
// compile with: /clr /c
3535
ref class B {};

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ A class must implement all members of an interface from which it directly inheri
1515

1616
C4488 can occur if an implemented member is not public. The following sample generates C4488.
1717

18-
```
18+
```cpp
1919
// C4488.cpp
2020
// compile with: /clr /c /W1 /WX
2121
interface struct MyI {
@@ -36,7 +36,7 @@ public:
3636
3737
C4488 can occur if an implemented member is not marked virtual. The following sample generates C4488.
3838
39-
```
39+
```cpp
4040
// C4488_b.cpp
4141
// compile with: /clr /c /W1 /WX
4242
interface struct MyI {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ For more information, see [Override Specifiers](../../extensions/override-specif
1717

1818
The following sample generates C4489.
1919

20-
```
20+
```cpp
2121
// C4489.cpp
2222
// compile with: /clr /c /W1
2323
public interface class I {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ For more information, see [Override Specifiers](../../extensions/override-specif
1717

1818
The following sample generates C4490.
1919

20-
```
20+
```cpp
2121
// C4490.cpp
2222
// compile with: /clr /c /W1
2323

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ To resolve this warning, explicitly declare the return type of functions.
1515

1616
The following sample generates C4508:
1717

18-
```
18+
```cpp
1919
// C4508.cpp
2020
// compile with: /W1 /c
2121
#pragma warning (disable : 4430)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ms.assetid: 4ad21004-f076-43fd-99f4-4bf1f9be4c0b
1111

1212
The following sample generates C4518:
1313

14-
```
14+
```cpp
1515
// C4518.cpp
1616
// compile with: /c /W1
1717
_declspec(dllexport) extern "C" void MyFunction(); // C4518

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The static member function meets the criteria to override the virtual function,
1313

1414
The following code generates C4526:
1515

16-
```
16+
```cpp
1717
// C4526.cpp
1818
// compile with: /W1 /c
1919
// C4526 expected

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ When the /EHsc option has not been enabled, an object with automatic storage in
1515

1616
The following sample generates C4530:
1717

18-
```
18+
```cpp
1919
// C4530.cpp
2020
// compile with: /W1
2121
int main() {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ If you must jump out of a **__finally** block, check for abnormal termination fi
2525

2626
The following sample generates C4532; simply comment out the jump statements to resolve the warnings.
2727

28-
```
28+
```cpp
2929
// C4532.cpp
3030
// compile with: /W1
3131
// C4532 expected

0 commit comments

Comments
 (0)