Skip to content

Add language identifiers #1661

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ A type declaration or definition uses a type qualifier (**const**, **volatile**,

The following sample generates C4114:

```
```cpp
// C4114.cpp
// compile with: /W1 /c
volatile volatile int i; // C4114
```

The following sample generates C4114:

```
```cpp
// C4114_b.cpp
// compile with: /W1 /c
static const int const * ii; // C4114
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ macro name 'name' is reserved; 'Command' ignored

The following sample generates C4117:

```
```cpp
// C4117.cpp
// compile with: /W1
#define __FILE__ test // C4117. __FILE__ is a predefined macro
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The C++ standard, in section 2.13.2 discusses escape sequences.

The following sample generates C4129:

```
```cpp
// C4129.cpp
// compile with: /W1
int main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The closing-comment delimiter is not preceded by an opening-comment delimiter. T

## Example

```
```cpp
// C4138a.cpp
// compile with: /W1
int */*comment*/ptr; // C4138 Ambiguous first delimiter causes warning
Expand All @@ -26,7 +26,7 @@ This warning can be caused by trying to nest comments.

This warning may be resolved if you comment out sections of code that contain comments, enclose the code in an **#if/#endif** block, and set the controlling expression to zero:

```
```cpp
// C4138b.cpp
// compile with: /W1
#if 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ms.assetid: 6ce8c058-7f4c-41cf-93e7-90a466744656

## Example

```
```cpp
// C4141.cpp
// compile with: /W1 /LD
inline inline void func (); // C4141
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ To fix by checking the following possible causes:

The following sample generates C4142:

```
```c
// C4142.c
// compile with: /W1
float X2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ms.assetid: a37b445d-dbc6-43b4-8d95-ffd0e4225464

The specified relational expression was used as the control expression of a [switch](../../cpp/switch-statement-cpp.md) statement. The associated case statements will be offered Boolean values. The following sample generates C4144:

```
```cpp
// C4144.cpp
// compile with: /W1
int main()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ A `switch` statement uses a relational expression as its control expression, whi

The following sample generates C4145:

```
```cpp
// C4145.cpp
// compile with: /W1
int main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ You cannot use `delete` on an array, so the compiler converts the array to a poi

## Example

```
```cpp
// C4154.cpp
// compile with: /c /W1
int main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The array form of **delete** should be used to delete an array. This warning occ

The following sample generates C4155:

```
```cpp
// C4155.cpp
// compile with: /Za /W1
#include <stdio.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ To resolve this warning, compile in a .c file (invoke the C compiler). If you m

The following sample generates C4162

```
```cpp
// C4162.cpp
// compile with: /c /W1
unsigned char _bittest(long* a, long b);
Expand All @@ -30,7 +30,7 @@ int main() {

Possible resolution:

```
```cpp
// C4162b.cpp
// compile with: /c
extern "C"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The specified function cannot be used as an [intrinsic](../../preprocessor/intri

The following sample generates C4163:

```
```cpp
// C4163.cpp
// compile with: /W1 /LD
#include <math.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ To avoid this warning, remove the **#pragma function**.

## Example

```
```cpp
// C4167.cpp
// compile with: /W1
#include <malloc.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Redesign the function so that it does not return the address of a local object.

The following sample generates C4172:

```
```cpp
// C4172.cpp
// compile with: /W1 /LD
float f = 10;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ms.assetid: 63301e51-24bc-43c4-bb11-252f7d513e9e

## Example

```
```cpp
// C4174.cpp
// compile with: /W1
#pragma component(info) // C4174; unknown
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The **component** pragma contains an invalid subcomponent. To exclude references

## Example

```
```cpp
// C4176.cpp
// compile with: /W1 /LD
#pragma component(browser, off, i) // C4176
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The [pragma](../../preprocessor/pragma-directives-and-the-pragma-keyword.md) pra

The following sample generates C4177:

```
```cpp
// C4177.cpp
// compile with: /W1
// #pragma bss_seg("global") // OK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ A case constant in a `switch` expression does not fit in the type to which it is

## Example

```
```cpp
// C4178.cpp
// compile with: /W1
int main()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ A qualifier, such as **const**, is applied to a function type defined by `typede

## Example

```
```cpp
// C4180.cpp
// compile with: /W1 /c
typedef int FuncType(void);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The inline definition of a member function in a class or a structure does not ha

The following sample generates C4183:

```
```cpp
// C4183.cpp
// compile with: /W1 /c
#pragma warning(disable : 4430)
Expand Down