Skip to content

Commit fa11977

Browse files
author
Colin Robertson
authored
Merge pull request #2487 from MicrosoftDocs/FromPublicMasterBranch
Confirm merge from FromPublicMasterBranch to master to sync with https://github.com/MicrosoftDocs/cpp-docs (branch master)
2 parents 1115b14 + 89bc09a commit fa11977

40 files changed

+48
-48
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ An invalid warning specifier was used with **pragma** [warning](../../preprocess
1313

1414
The following sample generates C4615:
1515

16-
```
16+
```cpp
1717
// C4615.cpp
1818
// compile with: /W1 /LD
1919
#pragma warning(enable : 4401) // C4615, 'enable' not valid specifier

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The warning number specified in the [warning](../../preprocessor/warning.md) pra
1313

1414
The following sample generates C4616:
1515

16-
```
16+
```cpp
1717
// C4616.cpp
1818
// compile with: /W1 /c
1919
#pragma warning( disable : 0 ) // C4616

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The pragma was processed without the argument.
1515

1616
The following sample generates C4618:
1717

18-
```
18+
```cpp
1919
// C4618.cpp
2020
// compile with: /W1 /LD
2121
#pragma code_seg("") // C4618

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ There is no postfix increment operator defined for the given type. The compiler
1313

1414
This warning can be avoided by defining a postfix `++` operator. Create a two-argument version of the `++` operator as shown here:
1515

16-
```
16+
```cpp
1717
// C4620.cpp
1818
// compile with: /W1
1919
class A

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ There was no postfix decrement operator defined for the given type. The compiler
1313

1414
This warning can be avoided by defining a postfix `--` operator. Create a two-argument version of the `--` operator as shown below:
1515

16-
```
16+
```cpp
1717
// C4621.cpp
1818
// compile with: /W1
1919
class A

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ A destructor was not accessible or deleted in a base class and was therefore not
1313

1414
The following sample generates C4624 and shows how to fix it:
1515

16-
```
16+
```cpp
1717
// C4624.cpp
1818
// compile with: /W1 /c
1919
class B {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ This warning is off by default. See [Compiler Warnings That Are Off by Default](
1515

1616
The following sample generates C4628:
1717

18-
```
18+
```cpp
1919
// C4628.cpp
2020
// compile with: /WX
2121
#pragma warning(default : 4628)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ms.assetid: d8926376-7acc-4fc7-8438-6f0de3468870
1111

1212
A data member or member function is defined as `extern`. Members cannot be external, although entire objects can. The compiler ignores the `extern` keyword. The following sample generates C4630:
1313

14-
```
14+
```cpp
1515
// C4630.cpp
1616
// compile with: /W1 /LD
1717
class A {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The path to .xdc file (`file`) was not valid, and no .xdc file created.
1313

1414
The following sample generates C4632:
1515

16-
```
16+
```cpp
1717
// C4632.cpp
1818
// compile with: /clr /docv:\\falsedir /LD /W1
1919
// C4632 expected

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ms.assetid: e29ba8db-7917-43f6-8e34-868b752279ae
1111

1212
The .drectve option was used to pass an option to the linker. Instead use pragma [comment](../../preprocessor/comment-c-cpp.md) for passing a linker option.
1313

14-
```
14+
```cpp
1515
// C4659.cpp
1616
// compile with: /W1 /LD
1717
#pragma code_seg(".drectve") // C4659

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ A member of the template class is not defined.
1313

1414
## Example
1515

16-
```
16+
```cpp
1717
// C4661.cpp
1818
// compile with: /W1 /LD
1919
template<class T> class MyClass {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The specified template-class was declared, but not defined.
1313

1414
## Example
1515

16-
```
16+
```cpp
1717
// C4662.cpp
1818
// compile with: /W1 /LD
1919
template<class T, int i> class MyClass; // no definition

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ You cannot instantiate a function template that has not been declared.
1313

1414
The following sample will cause C4667:
1515

16-
```
16+
```cpp
1717
// C4667a.cpp
1818
// compile with: /LD /W1
1919
template
@@ -22,7 +22,7 @@ void max(const int &, const int &); // C4667 expected
2222
2323
To avoid this warning, first declare the function template:
2424
25-
```
25+
```cpp
2626
// C4667b.cpp
2727
// compile with: /LD
2828
// Declare the function template

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ A cast contains a Windows Runtime or managed type. The compiler completes the ca
1313

1414
The following sample generates C4669 and shows how to fix it:
1515

16-
```
16+
```cpp
1717
// C4669.cpp
1818
// compile with: /clr /W1
1919
ref struct A {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The signature of a conversion operator was not correct. The method is not consid
1515

1616
The following sample generates C4674.
1717

18-
```
18+
```cpp
1919
// C4674.cpp
2020
// compile with: /clr /WX /W1 /LD
2121
ref class G {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ A type that has public accessibility outside the assembly uses a type that has p
1515

1616
The following sample generates C4677.
1717

18-
```
18+
```cpp
1919
// C4677.cpp
2020
// compile with: /clr /c /W1
2121
delegate void TestDel();

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ You used an attribute that should not commonly be used.
1313

1414
The following sample generates C4684:
1515

16-
```
16+
```cpp
1717
// C4684.cpp
1818
// compile with: /W1 /LD
1919
[module(name="xx")]; // C4684 expected

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ A constraint list has an assembly private type, meaning it will not be available
1515

1616
The following sample generates C4688.
1717

18-
```
18+
```cpp
1919
// C4688.cpp
2020
// compile with: /clr /c /W1
2121
ref struct A {}; // private type

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ However, unexpected behavior can occur if the compiler uses a definition that is
1919

2020
This sample contains the original type definition.
2121

22-
```
22+
```cpp
2323
// C4691_a.cpp
2424
// compile with: /clr /LD /W1
2525
public ref class Original_Type {};
@@ -29,7 +29,7 @@ public ref class Original_Type {};
2929
3030
This sample references C4691_a.dll and declares a field of type Original_Type.
3131
32-
```
32+
```cpp
3333
// C4691_b.cpp
3434
// compile with: /clr /LD
3535
#using "C4691_a.dll"
@@ -45,7 +45,7 @@ The following sample generates C4691. Notice this sample contains a definition
4545

4646
To resolve, reference the metadata file that contains the original type definition and remove the local declaration and definition.
4747

48-
```
48+
```cpp
4949
// C4691_c.cpp
5050
// compile with: /clr /LD /W1
5151
// C4691 expected

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ This warning is off by default. For more information, see [Compiler Warnings Tha
1919

2020
The following sample generates C4692.
2121

22-
```
22+
```cpp
2323
// C4692.cpp
2424
// compile with: /W1 /c /clr
2525
#pragma warning(default:4692)

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The specified function can potentially not return a value.
1313

1414
## Example
1515

16-
```
16+
```cpp
1717
// C4715a.cpp
1818
// compile with: /W1 /LD
1919
int func1( int i )
@@ -25,7 +25,7 @@ int func1( int i )
2525
2626
To prevent this warning, modify the code so that all paths assign a return value to the function:
2727
28-
```
28+
```cpp
2929
// C4715b.cpp
3030
// compile with: /LD
3131
int func1( int i )
@@ -37,7 +37,7 @@ int func1( int i )
3737

3838
It is possible that your code may contain a call to a function that never returns, as in the following example:
3939

40-
```
40+
```cpp
4141
// C4715c.cpp
4242
// compile with: /W1 /LD
4343
void fatal()

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ This warning is automatically promoted to an error. If you wish to modify this b
1919

2020
The following sample generates C4716:
2121

22-
```
22+
```cpp
2323
// C4716.cpp
2424
// compile with: /c /W1
2525
// C4716 expected

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Every path through a function contains a call to the function. Since there is no
1313

1414
The following sample generates C4717:
1515

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ To resolve, remove the function call that causes the destructor to not return.
1717

1818
The following sample generates C4722:
1919

20-
```
20+
```cpp
2121
// C4722.cpp
2222
// compile with: /O1 /W1 /c
2323
#include <stdlib.h>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ To safely use `__m64` types and floating-point types in the same function, each
1515

1616
The following sample generates C4730:
1717

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ A frame pointer register was modified. You must save and restore the register in
1313

1414
The following sample generates C4731:
1515

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ To resolve this warning, either remove the FS:0 definition or turn off this warn
1515

1616
The following sample generates C4733:
1717

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ To resolve this warning, only assign a value to a variable whose size can accomm
1515

1616
The following sample generates C4739:
1717

18-
```
18+
```cpp
1919
// C4739.cpp
2020
// compile with: /RTCs /Zi /W1 /c
2121
char *pc;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ For more information, see [pack](../../preprocessor/pack.md) and [__alignof Oper
1919

2020
This is the first file that defines the type.
2121

22-
```
22+
```c
2323
// C4742a.c
2424
// compile with: /c
2525
struct X {
@@ -31,7 +31,7 @@ struct X {
3131

3232
The following sample generates C4742.
3333

34-
```
34+
```c
3535
// C4742b.c
3636
// compile with: C4742a.c /W1 /GL
3737
// C4742 expected

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ C4744 is emitted only when files are compiled with /GL. For more information, s
2020

2121
This sample contains the first definition.
2222

23-
```
23+
```c
2424
// C4744.c
2525
// compile with: /c /GL
2626
int global;
@@ -30,7 +30,7 @@ int global;
3030

3131
The following sample generates C4744.
3232

33-
```
33+
```c
3434
// C4744b.c
3535
// compile with: C4744.c /GL /W1
3636
// C4744 expected

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ For more information, see [Initialization of Mixed Assemblies](../../dotnet/init
2323

2424
The following sample generates C4747.
2525

26-
```
26+
```cpp
2727
// C4747.cpp
2828
// compile with: /clr /c /W1
2929
// C4747 expected

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The 'identifier' function forces inline expansion of the [_alloca](../../c-runti
2525

2626
The following code example calls `MyFunction` in a loop, and `MyFunction` calls the `_alloca` function. The `__forceinline` modifier causes the inline expansion of the `_alloca` function.
2727

28-
```
28+
```cpp
2929
// c4750.cpp
3030
// compile with: /O2 /W1 /c
3131
#include <intrin.h>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ The resulting funclet name can be too long, and the compiler will truncate it an
1515

1616
To resolve this warning, shorten the original function name. If the function is a C++ template function or method, use a typedef for part of the name. For example:
1717

18-
```
18+
```cpp
1919
C1<x, y, z<T>>::C2<a,b,c>::f
2020
```
2121

2222
can be replaced by:
2323

24-
```
24+
```cpp
2525
typedef C1<x, y, z<T>>::C2<a,b,c> new_class ;
2626
new_class::f
2727
```

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The .tls$*x* section will exist in the object file where [__declspec(thread)](..
1717

1818
The following sample generates C4794:
1919

20-
```
20+
```cpp
2121
// C4794.cpp
2222
// compile with: /W1 /c
2323
#pragma data_seg(".someseg")

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ See [warning](../../preprocessor/warning.md) pragma for information on how to tu
1919

2020
The following sample generates C4803.
2121

22-
```
22+
```cpp
2323
// C4803.cpp
2424
// compile with: /clr /W1
2525
using namespace System;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ This warning is for when you used a `bool` variable or value in an unexpected wa
1515

1616
The following sample generates C4804:
1717

18-
```
18+
```cpp
1919
// C4804.cpp
2020
// compile with: /W1
2121

0 commit comments

Comments
 (0)