Skip to content

Commit 89bc09a

Browse files
author
Colin Robertson
authored
Merge pull request MicrosoftDocs#1705 from NextTurn/cpp-8
Add language identifiers
2 parents 74e104f + 08893a2 commit 89bc09a

20 files changed

+23
-23
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)

0 commit comments

Comments
 (0)