Skip to content

Add language identifiers #1660

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 @@ -21,7 +21,7 @@ This warning can be caused by specifying a storage class other than **register**

The following sample generates C4042

```
```cpp
// C4042.cpp
// compile with: /W1 /LD
int func2( __declspec( thread ) int tls_i ) // C4042
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ A pointer can point to a variable (one level of indirection), to another pointer

The following sample generates C4047:

```
```c
// C4047.c
// compile with: /W1

Expand All @@ -35,7 +35,7 @@ int main() {

The following sample generates C4047:

```
```c
// C4047b.c
// compile with: /W1
#include <stdio.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ One declaration of the function does not contain variable arguments. It is ignor

The following sample generates C4052:

```
```c
// C4052.c
// compile with: /W4 /c
int f();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ unknown pragma

The compiler ignored an unrecognized [pragma](../../preprocessor/pragma-directives-and-the-pragma-keyword.md). Be sure the **pragma** is allowed by the compiler you are using. The following sample generates C4068:

```
```cpp
// C4068.cpp
// compile with: /W1
#pragma NotAValidPragmaName // C4068, use valid name to resolve
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The compiler initialization area, which is specified by [#pragma init_seg](../..

The following sample generates C4074:

```
```cpp
// C4074.cpp
// compile with: /W1
#pragma init_seg( compiler ) // C4074
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ A [#pragma init_seg](../../preprocessor/init-seg.md) uses an unrecognized sectio

The following sample generates C4075:

```
```cpp
// C4075.cpp
// compile with: /W1
#pragma init_seg("mysegg") // C4075
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The compiler ignores the pragma and leaves the stack checking unchanged.

## Example

```
```cpp
// C4077.cpp
// compile with: /W1 /LD
#pragma check_stack yes // C4077
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ An unexpected separator token occurs in a pragma argument list. The remainder of

The following sample generates C4079:

```
```cpp
// C4079.cpp
// compile with: /W1
#pragma warning(disable : 4081)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The name of the segment in [#pragma alloc_text](../../preprocessor/alloc-text.md

The following sample generates C4080:

```
```cpp
// C4080.cpp
// compile with: /W1
extern "C" void func(void);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The compiler expected a different token in this context.

## Example

```
```cpp
// C4081.cpp
// compile with: /W1 /LD
#pragma optimize) "l", on ) // C4081
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ An identifier occurs in the wrong place in a **#pragma** statement.

## Example

```
```cpp
// C4083.cpp
// compile with: /W1 /LD
#pragma warning disable:4083 // C4083
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The pragma requires an **on** or **off** parameter. The pragma is ignored.

The following sample generates C4085:

```
```cpp
// C4085.cpp
// compile with: /W1 /LD
#pragma optimize( "t", maybe ) // C4085
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The pragma parameter does not have the required value (1, 2, 4, 8, or 16).

## Example

```
```cpp
// C4086.cpp
// compile with: /W1 /LD
#pragma pack( 3 ) // C4086
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This warning is for the C compiler.

## Example

```
```c
// C4087.c
// compile with: /W1
int f1( void ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This warning is issued for C programs. In a C++ program, the compiler issues an

The following sample generates C4090:

```
```c
// C4090.c
// compile with: /W1
int *volatile *p;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The compiler detected a situation where the user probably intended a variable to

A `__declspec` attribute at the beginning of a user-defined type declaration applies to the variable of that type. C4091 indicates no variable is declared. The following sample generates C4091.

```
```cpp
// C4091.cpp
// compile with: /W1 /c
__declspec(dllimport) class X {}; // C4091
Expand All @@ -32,7 +32,7 @@ class __declspec(dllimport) X3 {};

If an identifier is a typedef, it cannot also be a variable name. The following sample generates C4091.

```
```cpp
// C4091_b.cpp
// compile with: /c /W1 /WX
#define LIST 4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ See [Interface Attributes](../../windows/attributes/interface-attributes.md) for

The following sample generates C4096:

```
```cpp
// C4096.cpp
// compile with: /W1 /LD
#include "windows.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ A pragma was passed an invalid value.

The following sample generates C4097:

```
```cpp
// C4097.cpp
// compile with: /W1
#pragma runtime_checks("",test) // C4097
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Use #pragma [pack](../../preprocessor/pack.md)(pop) before exiting the header fi

The following sample generates C4103:

```
```cpp
// C4103.h
#pragma pack(push, 4)

Expand All @@ -27,7 +27,7 @@ The following sample generates C4103:

And then,

```
```cpp
// C4103.cpp
// compile with: /LD /W1
#include "c4103.h" // C4103
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The pragma containing the unexpected identifier is ignored.

## Example

```
```cpp
// C4109.cpp
// compile with: /W1 /LD
#pragma init_seg( abc ) // C4109
Expand Down