Skip to content

Commit 39dc07e

Browse files
authored
Merge pull request #3785 from MicrosoftDocs/master
9/21 AM Publishing
2 parents e48d425 + a27121d commit 39dc07e

File tree

94 files changed

+350
-223
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+350
-223
lines changed

docs/atl/reference/compiler-options-macros.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ These macros control specific compiler features.
1515
|[_ATL_ALL_WARNINGS](#_atl_all_warnings)|A symbol that enables errors in projects converted from previous versions of ATL.|
1616
|[_ATL_APARTMENT_THREADED](#_atl_apartment_threaded)|Define if one or more of your objects use apartment threading.|
1717
|[_ATL_CSTRING_EXPLICIT_CONSTRUCTORS](#_atl_cstring_explicit_constructors)|Makes certain `CString` constructors explicit, preventing any unintentional conversions.|
18-
|[_ATL_ENABLE_PTM_WARNING](#_atl_enable_ptm_warning)|Define this macro in order to use C++ standard compliant syntax, which generates the C4867 compiler error when a non-standard syntax is used to initialize a pointer to a member function.|
18+
|[_ATL_ENABLE_PTM_WARNING](#_atl_enable_ptm_warning)|Define this macro to require C++ standard syntax. It generates the C4867 compiler error when non-standard syntax is used to initialize a pointer to a member function.|
1919
|[_ATL_FREE_THREADED](#_atl_free_threaded)|Define if one or more of your objects use free or neutral threading.|
2020
|[_ATL_MULTI_THREADED](#_atl_multi_threaded)|A symbol that indicates the project will have objects that are marked as Both, Free or Neutral. The macro [_ATL_FREE_THREADED](#_atl_free_threaded) should be used instead.|
2121
|[_ATL_NO_AUTOMATIC_NAMESPACE](#_atl_no_automatic_namespace)|A symbol that prevents the default use of namespace as ATL.|
2222
|[_ATL_NO_COM_SUPPORT](#_atl_no_com_support)|A symbol that prevents COM-related code from being compiled with your project.|
2323
|[ATL_NO_VTABLE](#atl_no_vtable)|A symbol that prevents the vtable pointer from being initialized in the class's constructor and destructor.|
24-
|[ATL_NOINLINE](#atl_noinline)|A symbol that indicates a function should not be inlined.|
24+
|[ATL_NOINLINE](#atl_noinline)|A symbol that indicates a function shouldn't be inlined.|
2525
|[_ATL_SINGLE_THREADED](#_atl_single_threaded)|Define if all of your objects use the single threading model.|
2626

2727
## <a name="_atl_all_warnings"></a> _ATL_ALL_WARNINGS
@@ -56,7 +56,7 @@ By adding the following line to the *pch.h* (*stdafx.h* in Visual Studio 2017 an
5656

5757
[!code-cpp[NVC_ATL_Utilities#97](../../atl/codesnippet/cpp/compiler-options-macros_1.h)]
5858

59-
If this `#define` is added, the ATL headers are careful to preserve the state of these warnings so that they are not disabled globally (or if the user explicitly disables individual warnings, not to enable them).
59+
If this `#define` is added, the ATL headers are careful to preserve the state of these warnings so that they're not disabled globally (or if the user explicitly disables individual warnings, not to enable them).
6060

6161
New projects have this `#define` set in *pch.h* (*stdafx.h* in Visual Studio 2017 and earlier) by default.
6262

@@ -70,13 +70,13 @@ _ATL_APARTMENT_THREADED
7070

7171
### Remarks
7272

73-
Specifies apartment threading. See [Specifying the Project's Threading Model](../../atl/specifying-the-threading-model-for-a-project-atl.md) for other threading options, and [Options, ATL Simple Object Wizard](../../atl/reference/options-atl-simple-object-wizard.md) for a description of the threading models available for an ATL object.
73+
Specifies apartment threading. For other options, and a description of the threading models available for an ATL object, see [Specifying the Project's Threading Model](../../atl/specifying-the-threading-model-for-a-project-atl.md) and [Options, ATL Simple Object Wizard](../../atl/reference/options-atl-simple-object-wizard.md).
7474

7575
## <a name="_atl_cstring_explicit_constructors"></a> _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
7676

7777
Makes certain `CString` constructors explicit, preventing any unintentional conversions.
7878

79-
```
79+
```cpp
8080
_ATL_CSTRING_EXPLICIT_CONSTRUCTORS
8181
```
8282

@@ -88,19 +88,19 @@ By using the _T macro on all constructor string arguments, you can define _ATL_C
8888

8989
## <a name="_atl_enable_ptm_warning"></a> _ATL_ENABLE_PTM_WARNING
9090

91-
Define this macro in order to force the use of ANSI C++ standard-compliant syntax for pointer to member functions. Using this macro will cause the C4867 compiler error to be generated when non-standard syntax is used to initialize a pointer to a member function.
91+
Define this macro in order to force the use of ANSI C++ standard-conforming syntax for pointer to member functions. Using this macro will cause the C4867 compiler error to be generated when non-standard syntax is used to initialize a pointer to a member function.
9292

93-
```
93+
```cpp
9494
#define _ATL_ENABLE_PTM_WARNING
9595
```
9696

9797
### Remarks
9898

99-
The ATL and MFC libraries have been changed to match the Microsoft C++ compiler's improved standard C++ compliance. According to the ANSI C++ standard, the syntax of a pointer to a class member function should be `&CMyClass::MyFunc`.
99+
The ATL and MFC libraries have been changed to match the Microsoft C++ compiler's improved standard C++ conformance. According to the ANSI C++ standard, the syntax of a pointer to a class member function should be `&CMyClass::MyFunc`.
100100

101-
When [_ATL_ENABLE_PTM_WARNING](#_atl_enable_ptm_warning) is not defined (the default case), ATL/MFC disables the C4867 error in macro maps (notably message maps) so that code that was created in earlier versions can continue to build as before. If you define **_ATL_ENABLE_PTM_WARNING**, your code should be C++ standard compliant.
101+
When [_ATL_ENABLE_PTM_WARNING](#_atl_enable_ptm_warning) is not defined (the default case), ATL/MFC disables the C4867 error in macro maps (notably message maps) so that code that was created in earlier versions can continue to build as before. If you define **_ATL_ENABLE_PTM_WARNING**, your code should conform to the C++ standard.
102102

103-
However, the non-standard form has been deprecated. You need to move existing code to C++ standard compliant syntax. For example, the following code:
103+
However, the non-standard form has been deprecated. You need to move existing code to C++ standard syntax. For example, the following code:
104104

105105
[!code-cpp[NVC_MFCListView#14](../../atl/reference/codesnippet/cpp/compiler-options-macros_2.cpp)]
106106

docs/build-insights/get-started-with-cpp-build-insights.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: "Get started with C++ Build Insights"
33
description: "A high-level overview of C++ Build Insights."
44
ms.date: "11/03/2019"
55
helpviewer_keywords: ["C++ Build Insights", "throughput analysis", "build time analysis", "vcperf.exe"]
6+
ms.custom: intro-get-started
67
---
78
# Get started with C++ Build Insights
89

docs/build-insights/index.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ title: C++ Build Insights | Automate build tool chain analysis # < 60 chars
33
summary: Use C++ Build Insights for real-time and automated build analysis and optimization. # < 160 chars
44

55
metadata:
6-
title: C++ Build Insights # Required; page title displayed in search results. Include the brand. < 60 chars.
6+
title: C++ Build Insights
77
description: Learn how to use C++ Build Insights to analyze and optimize your builds.
88
ms.topic: landing-page
99
author: corob-msft
1010
ms.author: corob
1111
ms.date: 05/26/2020
12+
ms.custom: intro-landing-hub
1213

1314
# linkListType: architecture | concept | deploy | download | get-started | how-to-guide | learn | overview | quickstart | reference | tutorial | video | whats-new
1415

docs/build/configuring-programs-for-windows-xp.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Configuring Programs for Windows XP"
33
description: "How to install and use the C++ Windows XP toolsets in Visual Studio."
4-
ms.date: "03/16/2020"
4+
ms.date: 09/17/2021
55
ms.assetid: 1e4487b3-d815-4123-878b-5718b22f0fd5
66
---
77
# Configuring Programs for Windows XP
@@ -95,7 +95,7 @@ Because of differences in platform and library support, the development experien
9595
## Windows XP deployment
9696

9797
> [!IMPORTANT]
98-
> Because it lacks support for SHA-256 code signing certificates, runtime library support for Windows XP is no longer available in the [latest Visual C++ Redistributable](https://support.microsoft.com/topic/the-latest-supported-visual-c-downloads-2647da03-1eea-4433-9aff-95f26a218cc0) for Visual Studio 2015, 2017, and 2019. The last redistributable to support Windows XP is version 16.7 (file version 14.27.29114.0). If your Windows XP apps are deployed with or updated to a later version of the redistributable, the apps won't run.
98+
> Because it lacks support for SHA-256 code signing certificates, runtime library support for Windows XP is no longer available in the [latest Visual C++ Redistributable](../windows/latest-supported-vc-redist.md) for Visual Studio 2015, 2017, 2019, and 2022. The last Redistributable to support Windows XP shipped in Visual Studio 2019 version 16.7. Use a Redistributable that has a file version starting with **14.27**. If your Windows XP apps are deployed with or updated to a later version of the redistributable, the apps won't run.
9999
100100
If you're using a version of Visual Studio later than Visual Studio 2019 version 16.7, the redistributable files won't work on Windows XP. To get a copy of the redistributable files that support Windows XP, you'll need a Visual Studio account. Use the account you use to sign in to Visual Studio. Or, you can create an account for free at [my.visualstudio.com](https://my.visualstudio.com). The redistributable file is available in the Downloads section, as [Visual C++ Redistributable for Visual Studio 2019 - Version 16.7](https://my.visualstudio.com/Downloads?q=Redistributable%20for%20Visual%20Studio%202019%20Version%2016.7). To download the files, select the platform and language you need, and then choose the Download button.
101101

docs/build/projects-and-build-systems-cpp.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ ms.date: "07/17/2019"
55
helpviewer_keywords: ["builds [C++]", "C++ projects, building", "projects [C++], building", "builds [C++], options", "C++, build options"]
66
ms.assetid: fa6ed4ff-334a-4d99-b5e2-a1f83d2b3008
77
ms.topic: "overview"
8+
ms.custom: intro-overview
89
---
910
# C/C++ projects and build systems in Visual Studio
1011

docs/build/reference/zc-inline-remove-unreferenced-comdat.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ By default, this option is off (**/Zc:inline-**) in command-line builds. The [/p
2222

2323
If **/Zc:inline** is specified, the compiler enforces the C++11 requirement that all functions declared **`inline`** must have a definition available in the same translation unit if they are used. When the option is not specified, the Microsoft compiler allows non-conformant code that invokes functions declared **`inline`** even if no definition is visible. For more information, see the C++11 standard, in section 3.2 and section 7.1.2. This compiler option was introduced in Visual Studio 2013 Update 2.
2424

25-
To use the **/Zc:inline** option, update non-compliant code.
25+
To use the **/Zc:inline** option, update non-conforming code.
2626

27-
This example shows how the non-compliant use of an inline function declaration without a definition still compiles and links when the default **/Zc:inline-** option is used:
27+
This example shows how the non-conforming use of an inline function declaration without a definition still compiles and links when the default **/Zc:inline-** option is used:
2828

2929
```cpp
3030
// example.h

docs/build/vscpp-step-0-installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Install C and C++ support in Visual Studio
33
description: "Learn how to install Visual Studio with support for Microsoft C/C++ and related workloads."
4-
ms.custom: "vs-acquisition"
4+
ms.custom: vs-acquisition, intro-installation
55
ms.date: 11/05/2020
66
ms.topic: "tutorial"
77
ms.devlang: "cpp"

docs/build/walkthrough-compile-a-c-program-on-the-command-line.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ You can use NMAKE and makefiles, or MSBuild and project files to configure and b
170170
171171
The C and C++ languages are similar, but not the same. The Microsoft C/C++ compiler (MSVC) uses a basic rule to determine which language to use when it compiles your code. By default, the MSVC compiler treats all files that end in *`.c`* as C source code, and all files that end in *`.cpp`* as C++ source code. To force the compiler to treat all files as C no matter the file name extension, use the [/TC](reference/tc-tp-tc-tp-specify-source-file-type.md) compiler option.
172172
173-
MSVC is compatible with the ANSI C89 and ISO C99 standards, but not strictly compliant. In most cases, portable C code will compile and run as expected. The compiler provides optional support for the changes in ISO C11/C17. To compile with C11/C17 support, use the compiler flag **`/std:c11`** or **`/std:c17`**. C11/C17 support requires Windows SDK 10.0.20201.0 or later. Windows SDK 10.0.20348.0 (version 2104) or later is recommended. You can download the latest SDK from the [Windows 10 SDK](https://developer.microsoft.com/windows/downloads/windows-10-sdk/) page. For more information, and instructions on how to install and use this SDK for C development, see [Install C11 and C17 support in Visual Studio](../overview/install-c17-support.md).
173+
MSVC is compatible with the ANSI C89 and ISO C99 standards, but not strictly conforming. In most cases, portable C code will compile and run as expected. The compiler provides optional support for the changes in ISO C11/C17. To compile with C11/C17 support, use the compiler flag **`/std:c11`** or **`/std:c17`**. C11/C17 support requires Windows SDK 10.0.20201.0 or later. Windows SDK 10.0.20348.0 (version 2104) or later is recommended. You can download the latest SDK from the [Windows 10 SDK](https://developer.microsoft.com/windows/downloads/windows-10-sdk/) page. For more information, and instructions on how to install and use this SDK for C development, see [Install C11 and C17 support in Visual Studio](../overview/install-c17-support.md).
174174
175175
Certain library functions and POSIX function names are deprecated by MSVC. The functions are supported, but the preferred names have changed. For more information, see [Security Features in the CRT](../c-runtime-library/security-features-in-the-crt.md) and [Compiler Warning (level 3) C4996](../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md).
176176

docs/c-language/c-bit-fields.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,23 +48,24 @@ Bit fields defined as **`int`** are treated as **`signed`**. A Microsoft extensi
4848

4949
Bit fields are allocated within an integer from least-significant to most-significant bit. In the following code
5050

51-
```
51+
```C
5252
struct mybitfields
5353
{
5454
unsigned short a : 4;
5555
unsigned short b : 5;
5656
unsigned short c : 7;
5757
} test;
5858

59-
int main( void );
59+
int main( void )
6060
{
6161
test.a = 2;
6262
test.b = 31;
6363
test.c = 0;
64+
return 0;
6465
}
6566
```
6667
67-
the bits would be arranged as follows:
68+
the bits of `test` would be arranged as follows:
6869
6970
```
7071
00000001 11110010
@@ -73,6 +74,20 @@ cccccccb bbbbaaaa
7374
7475
Since the 8086 family of processors stores the low byte of integer values before the high byte, the integer `0x01F2` above would be stored in physical memory as `0xF2` followed by `0x01`.
7576
77+
The ISO C99 standard lets an implementation choose whether a bit field may straddle two storage instances. Consider this structure, which stores four bit fields that total 64 bits:
78+
79+
```C
80+
struct
81+
{
82+
unsigned int first : 9;
83+
unsigned int second : 7;
84+
unsigned int may_straddle : 30;
85+
unsigned int last : 18;
86+
} tricky_bits;
87+
```
88+
89+
A standard C implementation could pack these bit fields into two 32-bit integers. It might store `tricky_bits.may_straddle` as 16 bits in one 32-bit integer and 14 bits in the next 32-bit integer. The Windows ABI convention packs bit fields into single storage integers, and doesn't straddle storage units. The Microsoft compiler stores each bit field in the above example so it fits completely in a single 32-bit integer. In this case, `first` and `second` are stored in one integer, `may_straddle` is stored in a second integer, and `last` is stored in a third integer. The `sizeof` operator returns `12` on an instance of `tricky_bits`. For more information, see [Padding and alignment of structure members](padding-and-alignment-of-structure-members.md).
90+
7691
**END Microsoft Specific**
7792

7893
## See also

docs/c-language/c-keywords.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ The following keywords and special identifiers are recognized by the Microsoft C
123123

124124
Microsoft extensions are enabled by default. To assist in creating portable code, you can disable Microsoft extensions by specifying the [/Za \(Disable language extensions)](../build/reference/za-ze-disable-language-extensions.md) option during compilation. When you use this option, some Microsoft-specific keywords are disabled.
125125

126-
When Microsoft extensions are enabled, you can use the keywords listed above in your programs. For standards compliance, most of these keywords are prefaced by a double underscore. The four exceptions, **`dllexport`**, **`dllimport`**, **`naked`**, and **`thread`**, are used only with **`__declspec`** and don't require a leading double underscore. For backward compatibility, single-underscore versions of the rest of the keywords are supported.
126+
When Microsoft extensions are enabled, you can use the keywords listed above in your programs. To conform to the language standard, most of these keywords are prefaced by a double underscore. The four exceptions, **`dllexport`**, **`dllimport`**, **`naked`**, and **`thread`**, are used only with **`__declspec`** and don't require a leading double underscore. For backward compatibility, single-underscore versions of the rest of the keywords are supported.
127127

128128
## See also
129129

docs/c-language/c-type-specifiers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ The keyword **`void`** has three uses: to specify a function return type, to spe
3535

3636
**Microsoft Specific**
3737

38-
Type checking is now ANSI-compliant, which means that type **`short`** and type **`int`** are distinct types. For example, this is a redefinition in the Microsoft C compiler that was accepted by previous versions of the compiler.
38+
Type checking is now ANSI-conforming, which means that type **`short`** and type **`int`** are distinct types. For example, this is a redefinition in the Microsoft C compiler that was accepted by previous versions of the compiler.
3939

4040
```C
4141
int myfunc();

0 commit comments

Comments
 (0)