Skip to content
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,7 +13,7 @@ With the default Microsoft extensions (/Ze), you can use casts on the left side

## Example

```
```c
// C4213.c
// compile with: /W4
void *a;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ With the default Microsoft extensions (/Ze), bitfield structure members can be o

## Example

```
```c
// C4214.c
// compile with: /W4
struct bitfields
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Under the default Microsoft extensions (/Ze), a pointer to a function matches a

## Example

```
```c
// C4220.c
// compile with: /W4

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ With the default Microsoft extensions (/Ze), you can initialize an aggregate typ

## Example

```
```c
// C4221.c
// compile with: /W4
struct S
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Under Microsoft extensions (/Ze), you can give a nonstatic value as the address

The following sample generates C4232:

```
```c
// C4232.c
// compile with: /W4 /Ze /c
int __declspec(dllimport) f();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The compiler does not yet implement the keyword you used.

This warning is automatically promoted to an error. If you wish to modify this behavior, use [#pragma warning](../../preprocessor/warning.md). For example, to make C4234 into a level 4 warning issue,

```
```cpp
#pragma warning(2:4234)
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The compiler does not support the keyword you used.

This warning is automatically promoted to an error. If you wish to modify this behavior, use [#pragma warning](../../preprocessor/warning.md). For example, to make C4235 into a level 2 warning, use the following line of code

```
```cpp
#pragma warning(2:4235)
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ For compatibility with previous versions of Visual C++, Microsoft extensions (**

## Example

```
```cpp
// C4238.cpp
// compile with: /W4 /c
struct C {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This type conversion is not allowed by the C++ standard, but it is permitted her

The following sample generates C4239.

```
```cpp
// C4239.cpp
// compile with: /W4 /c
struct C {
Expand All @@ -35,7 +35,7 @@ Conversion from integral type to enum type is not strictly allowed.

The following sample generates C4239.

```
```cpp
// C4239b.cpp
// compile with: /W4 /c
enum E { value };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ For additional information on C4242, see [Common Compiler Errors](/windows/win32

The following sample generates C4242:

```
```cpp
// C4242.cpp
// compile with: /W4
#pragma warning(4:4242)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ You tried to convert a signed **const** that has a negative value to an `unsigne

The following sample generates C4245:

```
```cpp
// C4245.cpp
// compile with: /W4 /c
const int i = -1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This warning is off by default. See [Compiler Warnings That Are Off by Default](

The following sample generates C4254:

```
```cpp
// C4254.cpp
// compile with: /W4
#pragma warning(default: 4254)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This warning is off by default. See [Compiler Warnings That Are Off by Default](

The following sample generates C4255:

```
```c
// C4255.c
// compile with: /W4 /WX
#pragma warning (default : 4255)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ To fix this warning,

The following sample generates C4256:

```
```cpp
// C4256.cpp
// compile with: /W4
// #pragma warning(disable : 4256)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This warning is off by default. See [Compiler Warnings That Are Off by Default](

The following sample generates C4263:

```
```cpp
// C4263.cpp
// compile with: /W4
#pragma warning(default:4263)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This warning is off by default. See [Compiler Warnings That Are Off by Default]

The following sample generates C4266:

```
```cpp
// C4266.cpp
// compile with: /W4 /c
#pragma warning (default : 4266)
Expand All @@ -32,7 +32,7 @@ class LocalBinding : private Engine {

Possible resolution:

```
```cpp
// C4266b.cpp
// compile with: /W4 /c
#pragma warning (default : 4266)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ A **const** global or static instance of a non-trivial class is initialized with

## Example

```
```cpp
// C4268.cpp
// compile with: /c /LD /W4
class X {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This warning is off by default. See [Compiler Warnings That Are Off by Default](

The following sample generates C4289:

```
```cpp
// C4289.cpp
// compile with: /W4 /Zc:forScope-
#pragma warning(default:4289)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This warning is off by default. See [Compiler Warnings That Are Off by Default](

The following sample generates C4296:

```
```cpp
// C4296.cpp
// compile with: /W4
#pragma warning(default : 4296)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Padding was added at the end of a structure because you specified a [__declspec(

For example, the following code generates C4324:

```
```cpp
// C4324.cpp
// compile with: /W4
struct __declspec(align(32)) A
Expand Down