Skip to content

Commit 7a6e430

Browse files
authored
Add "Remarks" and "Example" headings for warning references in range [C4201, C4230]
1 parent 0706b94 commit 7a6e430

24 files changed

+61
-1
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: f2aab64d-1bab-4f75-95ee-89e1263047b1
1010

1111
> nonstandard extension used : long float
1212
13+
## Remarks
14+
1315
The default Microsoft extensions (/Ze) treat **long float** as **`double`**. ANSI compatibility ([/Za](../../build/reference/za-ze-disable-language-extensions.md)) does not. Use **`double`** to maintain compatibility.
1416

17+
## Example
18+
1519
The following sample generates C4215:
1620

1721
```cpp

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@ ms.assetid: 211079dc-59d0-42a7-801c-2ddab21d7232
1010

1111
> nonstandard extension used : float long
1212
13-
The default Microsoft extensions (/Ze) treat **float long** as **`double`**. ANSI compatibility ([/Za](../../build/reference/za-ze-disable-language-extensions.md)) does not. Use **`double`** to maintain compatibility. The following sample generates C4216:
13+
## Remarks
14+
15+
The default Microsoft extensions (/Ze) treat **float long** as **`double`**. ANSI compatibility ([/Za](../../build/reference/za-ze-disable-language-extensions.md)) does not. Use **`double`** to maintain compatibility.
16+
17+
## Example
18+
19+
The following sample generates C4216:
1420

1521
```cpp
1622
// C4216.cpp

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ helpviewer_keywords: ["C4218"]
99

1010
> nonstandard extension used: must specify at least a storage class or a type
1111
12+
## Remarks
13+
1214
With the default Microsoft extensions (`/Ze`), you can declare a variable without specifying a type or storage class. The default type is **`int`**.
1315

1416
## Example

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 1531cae0-5040-49fd-b149-005bb5085391
1010

1111
> nonstandard extension used : formal parameter 'identifier' was previously defined as a type
1212
13+
## Remarks
14+
1315
The identifier was previously used as a **`typedef`**. This causes a warning under ANSI compatibility ([/Za](../../build/reference/za-ze-disable-language-extensions.md)).
1416

1517
## Example

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 69d6bbde-1300-4e48-8a9c-3648c80ab441
1010

1111
> nonstandard extension used : '*keyword*' is an obsolete keyword
1212
13+
## Remarks
14+
1315
The current version of Visual C++ does not use this keyword.
1416

1517
This warning is automatically promoted to an error.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 78f98374-c00b-4000-aefa-1b1c67b4666b
1010

1111
> anachronism used : qualifiers on reference are ignored
1212
13+
## Remarks
14+
1315
Using qualifiers like **`const`** or **`volatile`** with C++ references is an outdated practice.
1416

1517
## Example

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 9301d660-d601-464e-83f5-7ed844a3c6dc
1010

1111
> nonstandard extension used : qualifiers after comma in declarator list are ignored
1212
13+
## Remarks
14+
1315
Use of qualifiers like **`const`** or **`volatile`** after a comma when declaring variables is a Microsoft extension ([/Ze](../../build/reference/za-ze-disable-language-extensions.md)).
1416

1517
## Example

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ helpviewer_keywords: ["C4229"]
99

1010
> anachronism used: modifiers on data are ignored
1111
12+
## Remarks
13+
1214
Using a Microsoft modifier such as **`__cdecl`** on a data declaration is an outdated practice.
1315

1416
## Example

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: a4be8729-74b6-44df-a5ea-e3f45aad0f8f
1010

1111
> anachronism used : modifiers/qualifiers interspersed; qualifier ignored
1212
13+
## Remarks
14+
1315
Using a qualifier before a Microsoft modifier such as **`__cdecl`** is an outdated practice.
1416

1517
## Example

docs/error-messages/compiler-warnings/compiler-warning-level-4-c4201.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 6156f508-9393-4d77-9e73-1ec3e1c32d0d
1010

1111
> nonstandard extension used : nameless struct/union
1212
13+
## Remarks
14+
1315
Under Microsoft extensions (/Ze), you can specify a structure without a declarator as members of another structure or union. These structures generate an error under ANSI compatibility ([/Za](../../build/reference/za-ze-disable-language-extensions.md)).
1416

1517
## Example

0 commit comments

Comments
 (0)