Skip to content

Commit a283e74

Browse files
TaojunshenTylerMSFTTylerMSFTSteve Wishnousky3836425+corob-msft@users.noreply.github.com
authored
11/10/2021 AM Publish (MicrosoftDocs#3899)
* acrolinx and add to toc * rename existing file back to original filename * tech review * fix code sample (#3676) * fix code sample * acrolinx Co-authored-by: TylerMSFT <Tyler.Whitney@microsoft.com> * Update fsanitize.md * Add mention in asan-building and add fsanitize-coverage options. * Expand /fsanitize=fuzzer description. Unify table format used on page. * Reference fsanitize-coverage.md in toc + full option lists. * Fix warnings * every relevant edge * Add OneFuzz mention * Fix mistaken deletion in chrono.md * Fpcontract docs (#3691) * Update fp-specify-floating-point-behavior.md Add details on /fp:contract flag * Update float-control.md Update float_control pragma behavior with respect to contractions. * small update * Update fenv-access.md * Update fp-contract.md * Update predefined-macros.md * fix typo and PR comments * leave definition of contractions * Add /fp:contract to the main list * fix line break * Add link to fp:contract * Add reference to fp:contract * Call out changes by compiler version. Co-authored-by: 3836425+corob-msft@users.noreply.github.com <corob@microsoft.com> * Edit pass for i18n, grammar, and style * Respond to feedback * Add LibFuzzer link, consistency fixes * add new classes: ambiguous_local_time & nonexistent_local_time * acrolinx * fix links * finish descriptions * fix more links * smoothing out * proofing * add some better linking * tune description * update descriptions * needed to update local-info-struct.md to reflect changes to descriptions for nonexistent and ambiguous * add chrono functions * rounding out duration links * Add documentation for IntelliSense linter for C++ (MicrosoftDocs#3821) * Add first draft of linter check documentation * WIP overview. Signed-off-by: Kyle Reed <kylereed@microsoft.com> * Update toc. First draft of the linter overview. * Add screenshots, move files, code samples are stand-alone. Signed-off-by: Kyle Reed <kylereed@microsoft.com> * Style and Acrolinx grammar checker pass * Add missing Options cues for checks * Update to use latest option names Co-authored-by: 3836425+corob-msft@users.noreply.github.com <corob@microsoft.com> * connecting duration up to it's non-member pieces and doing some general updates * fix links * cleanup * Split out VS2019 content for linter (#3824) * Update working-with-project-properties.md * cleanup * cleanup * cleanup * cleanup * cleanup * cleanup * cleanup * fix function signature * fix line ending * remove duplicate * Address /profile issues per Paddy McD (#3834) * Update download URLs to point to 2022 redists * Fixed documentation that destroy dialogs * Update void-cpp for cpp-docs 3441 Reported in MicrosoftDocs/cpp-docs/issues/3441 Clarify kinds of class member where you can't use `void*`. Fix styles. Acrolinx a few things. * More clarity on void pointers to members * zoned_traits (#3831) * add zoned_traits * draft clock_cast and clock_time_conversion * first draft * draft * draft * fix heading * cleanup * add tzdb and tzdb-list * draft * draft * pull examples * draft cleanup * acrolinx * draft cleanup * draft cleanup * incorp tech review * tech review * cleanup * cleanup * acrolinx * fix casing * add example descriptions * wording * last adjustments * wording Co-authored-by: TylerMSFT <Tyler.Whitney@microsoft.com> * Update 16.1 conformance per J Emmett * Update docs/error-messages/compiler-errors-2/compiler-error-c2666.md * draft * acrolinx, links * links * Fix typo in page title * acrolinx * fix link * Fix TOC schema before VS2022 changes * cleanup the port * add additional info * Address 3449 typo in /analyze * update see also * Address 3462 add C5033 warning * Include link update * Typo * Add TOC entry * Update how-to-marshal-callbacks-and-delegates-by-using-cpp-interop.md typo: underlaying -> underlying * Fix typo in toc for tzdb_list * fix github issue #3469 (MicrosoftDocs#3852) Co-authored-by: TylerMSFT <Tyler.Whitney@microsoft.com> * remove constexpr, prevent machine translation of code elements, and bring closer to current doc style (MicrosoftDocs#3854) * remove constexpr * add remark * acrolinx * update casing * cleanup Co-authored-by: TylerMSFT <Tyler.Whitney@microsoft.com> * VS2022 update for what's new content * Acrolinx update * Fix validation, links, typos * Revert a styling quirk on headers * Validation error fix * Acrolinx and validation fixes * Conformance fix updates * Add description for new warning C26826 * Add name clarification to new description * Used more specific wording to avoid confusion * Adding missing intrinsic. * Fix intrinsic signature. * Fix wrong argument type. * Add headers, requirements * VS2022 features, C17, walkthroughs (MicrosoftDocs#3863) * VS2022 features, C17, walkthroughs * fix indentation to correct list step numbering * fix indentation to correct list step numbering * replace numbers with bold headings Co-authored-by: Beth Harvey <v-bharve@microsoft.com> * tech review feedback * cleanup * Frontrun bulk fixes for VS2022 * Fixes #3484 * Docs/corob/cpp docs 3481 d8049 (#3865) * Add D8049 error message * Acrolinx tweak * Update toc.yml fix apparent typo in TOC Co-authored-by: Jeff Borsecnik <36546697+jborsecnik@users.noreply.github.com> * More VS2022 non-bulk fixes. (#3867) * Bulk update VS2022 content (MicrosoftDocs#3860) * Bulk fix to update msvc-160 and msvc-170 * Fix stray moniker tags * incorp review * update wording around closing the folder * typos * fix typo introduced while fixing typos... * update formatting * update steps and formatting * Update working-with-resource-files.md * Update symbols-resource-identifiers.md * Update how-to-create-a-resource-script-file.md If you right click on a class you can't add resources. You should right click on a project. * started draft of STL conformance items * Update CMake landing page (#3864) * intro, installation, configure * config notifications * IDE integration * Building CMake projects * Debugging CMake projects * Open an existing cache * Edit CMakeLists.txt files * Configure IntelliSense * Troubleshooting, repro from CLI * Switch 17/19 CLI sections * edits * Fix code block * more edits * move images from docs/media to docs/build/media * Address feedback * Fix link style * Final edits * fix spelling per Acrolinx Co-authored-by: Beth Harvey <v-bharve@microsoft.com> * finished first cut at VS 2022 17.0 STL conformance updates * Broken link fixed * move lwg-3518 to a c++11 section * De-emphasize codeplex archive * Add gray border (MicrosoftDocs#3876) * tech review * remove LWG-* entries * Correct or remove links: validation issues * Update casting-c-cx.md * Update casting-c-cx.md * add vs 17.0 improvement summary for STL (MicrosoftDocs#3883) * add vs 17.0 improvement summary for STL * wordsmithing * acrolinx * acrolinx * typo * fix caps * typo Co-authored-by: TylerMSFT <Tyler.Whitney@microsoft.com> * update what's new in the docs (#3881) * add what's new for Oct 2021 * acrolinx * acrolinx * tidy up * update through date * tidy up * acrolinx * typo * Apply suggestions from PR review Co-authored-by: TylerMSFT <Tyler.Whitney@microsoft.com> Co-authored-by: Shannon Leavitt <V-SHLEAV@microsoft.com> * change STL name * Update install for VS2022 * Remove Preview text * fix vs version (#3889) Co-authored-by: TylerMSFT <Tyler.Whitney@microsoft.com> * Twhitney fix (#3891) * fix vs version * remove stray line Co-authored-by: TylerMSFT <Tyler.Whitney@microsoft.com> * Twhitney fix (MicrosoftDocs#3893) * fix vs version * remove stray line * fix version # * fix space Co-authored-by: TylerMSFT <Tyler.Whitney@microsoft.com> * Remove the deprecation of IT instructions in the ARM ABI Upstream ARM has undeprecated the use of IT instructions. There's no formal announcement of the matter in itself, but the previous deprecations are being removed from the official docs. See https://reviews.llvm.org/D108679#2975603 for a discussion on the matter. * Update C26826. Canonicalize core guidelines link. Include version info. Make Acrolinx happier. * Update OS and Redistributable support for VS2022 (#3897) Co-authored-by: TylerMSFT <Tyler.Whitney@microsoft.com> Co-authored-by: Tyler Whitney <TylerMSFT@users.noreply.github.com> Co-authored-by: Steve Wishnousky <stwish@microsoft.com> Co-authored-by: 3836425+corob-msft@users.noreply.github.com <corob@microsoft.com> Co-authored-by: Gautham Beeraka <58992211+Gautham-Beeraka1@users.noreply.github.com> Co-authored-by: Kyle Reed <kylereed@microsoft.com> Co-authored-by: Chai Wei Jie <chai_weijie@hotmail.com> Co-authored-by: opbld15 <opbld15@microsoft.com> Co-authored-by: PRMerger19 <prmrgr19@microsoft.com> Co-authored-by: Laura Brenner <90344170+laurabren@users.noreply.github.com> Co-authored-by: Courtney Wales <62625502+Court72@users.noreply.github.com> Co-authored-by: Andrea Courtright <74212614+v-andreaco@users.noreply.github.com> Co-authored-by: PRMerger15 <prmrgr15@microsoft.com> Co-authored-by: opbld16 <opbld16@microsoft.com> Co-authored-by: PRMerger8 <prmrgr8@microsoft.com> Co-authored-by: dxgldotorg <7480507+dxgldotorg@users.noreply.github.com> Co-authored-by: Anju Del Moral Gonzalez <judelmor@microsoft.com> Co-authored-by: opbld17 <opbld17@microsoft.com> Co-authored-by: Miya Natsuhara <46756417+mnatsuhara@users.noreply.github.com> Co-authored-by: Kristine Toliver <ktoliver@users.noreply.github.com> Co-authored-by: PRMerger7 <prmrgr7@microsoft.com> Co-authored-by: Avraham <avreimale@gmail.com> Co-authored-by: Paula Miller <v-paulmi@microsoft.com> Co-authored-by: Dmitry Kobets <dmitrykobets@microsoft.com> Co-authored-by: Weston McNamara <westonfmcnamara@gmail.com> Co-authored-by: Jose Rivero <jorive@microsoft.com> Co-authored-by: Beth Harvey <v-bharve@microsoft.com> Co-authored-by: PRMerger5 <prmergr5@microsoft.com> Co-authored-by: Red Team Rover <redteamrover@protonmail.com> Co-authored-by: Jeff Borsecnik <36546697+jborsecnik@users.noreply.github.com> Co-authored-by: mohammad-ghasemi-2549 <82893849+mohammad-ghasemi-2549@users.noreply.github.com> Co-authored-by: Erika <esweet431@gmail.com> Co-authored-by: Atik Mapari (Lionbridge Technologies Inc) <v-atmapa@microsoft.com> Co-authored-by: PRMerger Service account 2 <PRMerger-2@users.noreply.github.com> Co-authored-by: Jaiganesh Kumaran <jaiganesh.kumaran@outlook.com> Co-authored-by: PRMerger4 <prmergr4@microsoft.com> Co-authored-by: Shannon Leavitt <V-SHLEAV@microsoft.com> Co-authored-by: PRMerger13 <prmrgr13@microsoft.com> Co-authored-by: Martin Storsjö <martin@martin.st>
1 parent a398cd0 commit a283e74

File tree

5 files changed

+106
-73
lines changed

5 files changed

+106
-73
lines changed

docs/build/overview-of-arm-abi-conventions.md

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -38,28 +38,6 @@ The instruction set for Windows on ARM is strictly limited to Thumb-2. All code
3838

3939
A side-effect of this requirement is that all code pointers must have the low bit set. Then, when they're loaded and branched to via BLX or BX, the processor remains in Thumb mode. It doesn't try to execute the target code as 32-bit ARM instructions.
4040

41-
### IT Instructions
42-
43-
The use of IT instructions in Thumb-2 code is disallowed except for these specific cases:
44-
45-
- The IT instruction can only be used to modify one target instruction.
46-
47-
- The target must be one of these 16-bit instructions:
48-
49-
|16-Bit Opcodes|Class|Restrictions|
50-
|---------------------|-----------|------------------|
51-
|MOV, MVN|Move|`Rm != PC`, `Rd != PC`|
52-
|LDR, LDR[S]B, LDR[S]H|Load from memory|But not LDR literal forms|
53-
|STR, STRB, STRH|Store to memory||
54-
|ADD, ADC, RSB, SBC, SUB|Add or subtract|But not ADD/SUB SP, SP, imm7 forms<br /><br /> `Rm != PC`, `Rdn != PC`, `Rdm != PC`|
55-
|CMP, CMN|Compare|`Rm != PC`, `Rn != PC`|
56-
|MUL|Multiply||
57-
|ASR, LSL, LSR, ROR|Bit shift||
58-
|AND, BIC, EOR, ORR, TST|Bitwise arithmetic||
59-
|BX|Branch to register|`Rm != PC`|
60-
61-
Although current ARMv7 CPUs can't report the use of disallowed instruction forms, future generations are expected to. If these forms are detected, any program that uses them may be terminated with an undefined instruction exception.
62-
6341
### SDIV/UDIV instructions
6442

6543
The use of integer divide instructions SDIV and UDIV is fully supported, even on platforms without native hardware to handle them. The extra overhead per SDIV or UDIV divide on a Cortex-A9 processor is approximately 80 cycles. That's added to the overall divide time of 20-250 cycles, depending on the inputs.

docs/code-quality/c26826.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
title: C26826
3+
description: "Reference for Microsoft C++ Code Analysis warning C26826 in Visual Studio."
4+
ms.date: 10/25/2021
5+
f1_keywords: ["C26826"]
6+
helpviewer_keywords: ["C26826"]
7+
---
8+
# C26826
9+
10+
> Don't use C-style variable arguments (f.55).
11+
12+
For more information, see [F.55: Don't use `va_arg` arguments](http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#F-varargs) in the C++ Core Guidelines.
13+
14+
## Remarks
15+
16+
This check warns on all usages of `va_list`, `va_start`, `va_arg`, and `va_end`, discouraging the use of C-style variable arguments. C-style variable arguments are unsafe because they require the programmer to assume that the arguments are all passed and read with the correct types.
17+
18+
Warning C26826 is available starting in Visual Studio 2022 version 17.1.
19+
20+
## Example
21+
22+
```cpp
23+
int sum(int n, ...) {
24+
va_list l; // C26826 Don't use C-style variable arguments
25+
va_start(l, n); // C26826 Don't use C-style variable arguments
26+
27+
int s = 0;
28+
for (int i = 0; i < n; ++i) {
29+
// BAD, assumes the variable arguments will be passed as ints
30+
s += va_arg(l, int); // C26826 Don't use C-style variable arguments
31+
}
32+
33+
va_end(l); // C26826 Don't use C-style variable arguments
34+
return s;
35+
}
36+
37+
int main() {
38+
sum(2, 1, 2, 3); // ok
39+
sum(2, 1.5, 3.14159, 2.71828); // BAD, undefined
40+
}
41+
```
42+
43+
Alternatives to C-style variable arguments include:
44+
- function overloading
45+
- variadic templates
46+
- `std::variant` arguments
47+
- `std::initializer_list`

docs/cpp/new-operator-cpp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ms.assetid: 69fee812-1c28-4882-8fda-d1ad17860004
77
---
88
# new Operator (C++)
99

10-
Allocates memory for an object or array of objects of *type-name* from the free store and returns a suitably typed, nonzero pointer to the object.
10+
Allocates memory for an object or array of objects of *type-name* from the free store, commonly called the "heap", and returns a suitably typed, nonzero pointer to the object.
1111

1212
> [!NOTE]
1313
> Microsoft C++ Component Extensions provides support for the **`new`** keyword to add vtable slot entries. For more information, see [new (new slot in vtable)](../extensions/new-new-slot-in-vtable-cpp-component-extensions.md)

docs/overview/supported-platforms-visual-cpp.md

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -10,33 +10,36 @@ ms.assetid: 0d893056-4008-411a-b3d1-5f57fd7da95c
1010

1111
Apps built by using Visual Studio can be targeted to various platforms, as follows.
1212

13-
|Operating System|x86|x64|ARM|ARM64\*\*\*\*|
14-
|----------------------|---------|---------|---------|---------|
15-
|Windows XP|X\*|X\*|||
16-
|Windows Server 2003|X\*|X\*|||
17-
|Windows Vista|X|X|||
18-
|Windows Server 2008|X|X|||
19-
|Windows 7|X|X|||
20-
|Windows Server 2012 R2|X|X|||
21-
|Windows 8|X|X|X||
22-
|Windows 8.1|X|X|X||
23-
|Windows 10|X|X|X|X|
24-
|Windows 11|X|X|X|X|
25-
|Android \*\*|X|X|X|X|
26-
|iOS \*\*|X|X|X|X|
27-
|Linux \*\*\*|X|X|X|X|
28-
29-
\* You can use the Windows XP platform toolset included in Visual Studio 2017, Visual Studio 2015, Visual Studio 2013, and Visual Studio 2012 Update 1 to build Windows XP and Windows Server 2003 projects. For information on how to use this platform toolset, see [Configuring Programs for Windows XP](../build/configuring-programs-for-windows-xp.md). For additional information on changing the platform toolset, see [How to: Modify the Target Framework and Platform Toolset](../build/how-to-modify-the-target-framework-and-platform-toolset.md).
30-
31-
\*\* You can install the **Mobile development with C++** workload in the installer for Visual Studio 2017 and later. In Visual Studio 2015 setup, choose the optional **Visual C++ for Cross Platform Mobile Development** component to target iOS or Android platforms. For instructions, see [Install Visual C++ for Cross-Platform Mobile Development](/visualstudio/cross-platform/install-visual-cpp-for-cross-platform-mobile-development). To build iOS code, you must have a Mac computer and meet other requirements. For a list of prerequisites and installation instructions, see [Install And Configure Tools to Build using iOS](/visualstudio/cross-platform/install-and-configure-tools-to-build-using-ios). You can build x86 or ARM code to match the target hardware. Use x86 configurations to build for the iOS simulator, Microsoft Visual Studio Emulator for Android, and some Android devices. Use ARM configurations to build for iOS devices and most Android devices.
32-
33-
\*\*\* You can install the **Linux development with C++** workload in the installer for Visual Studio 2017 and later to target Linux platforms. For instructions, see [Download, Install and Setup the Linux Workload](../linux/download-install-and-setup-the-linux-development-workload.md). This toolset compiles your executable on the target machine, so you can build for any supported architecture.
34-
35-
\*\*\*\* ARM64 support is available in Visual Studio 2017 and later.
36-
37-
For information about how to set the target platform configuration, see [How to: Configure Visual C++ Projects to Target 64-Bit, x64 Platforms](../build/how-to-configure-visual-cpp-projects-to-target-64-bit-platforms.md).
13+
| Operating System | x86 | x64 | ARM | ARM64<sup>a</sup> |
14+
|--|--|--|--|--|
15+
| Windows XP<sup>xp</sup> | X | X | | |
16+
| Windows Vista | X | X | | |
17+
| Windows 7 | X | X | | |
18+
| Windows 8 | X | X | X | |
19+
| Windows 8.1 | X | X | X | |
20+
| Windows 10 | X | X | X | X |
21+
| Windows 11 | X | X | X | X |
22+
| Windows Server 2003<sup>xp</sup> | X | X | | |
23+
| Windows Server 2008 R2 | X | X | | |
24+
| Windows Server 2012 R2 | X | X | | |
25+
| Windows Server 2016 | X | X | | |
26+
| Windows Server 2019 | X | X | | |
27+
| Windows Server 2022 | X | X | | |
28+
| Android<sup>m</sup> | X | X | X | X |
29+
| iOS<sup>m</sup> | X | X | X | X |
30+
| Linux<sup>l</sup> | X | X | X | X |
31+
32+
<sup>xp</sup> You can use the Windows XP platform toolsets included in Visual Studio 2017, Visual Studio 2015, Visual Studio 2013, and Visual Studio 2012 Update 1 to build Windows XP and Windows Server 2003 projects. For information on how to use these platform toolsets, see [Configuring Programs for Windows XP](../build/configuring-programs-for-windows-xp.md). For more information on changing the platform toolset, see [How to: Modify the Target Framework and Platform Toolset](../build/how-to-modify-the-target-framework-and-platform-toolset.md).
33+
34+
<sup>m</sup> You can install the **Mobile development with C++** workload in the installer for Visual Studio 2017 and later. In Visual Studio 2015 setup, choose the optional **Visual C++ for Cross Platform Mobile Development** component to target iOS or Android platforms. For instructions, see [Install Visual C++ for Cross-Platform Mobile Development](/visualstudio/cross-platform/install-visual-cpp-for-cross-platform-mobile-development). To build iOS code, you must have a Mac computer and meet other requirements. For a list of prerequisites and installation instructions, see [Install And Configure Tools to Build using iOS](/visualstudio/cross-platform/install-and-configure-tools-to-build-using-ios). You can build x86 or ARM code to match the target hardware. Use x86 configurations to build for some Android devices. Use ARM configurations to build for iOS devices and most Android devices.
35+
36+
<sup>l</sup> You can install the **Linux development with C++** workload in the installer for Visual Studio 2017 and later to target Linux platforms. For instructions, see [Download, install, and setup the Linux Workload](../linux/download-install-and-setup-the-linux-development-workload.md). This toolset compiles your executable on the target machine, so you can build for any supported architecture.
37+
38+
<sup>a</sup> ARM64 support is available in Visual Studio 2017 and later.
39+
40+
For information about how to set the target platform configuration, see [How to: Configure Visual C++ Projects to Target 64-bit, x64 Platforms](../build/how-to-configure-visual-cpp-projects-to-target-64-bit-platforms.md).
3841

3942
## See also
4043

41-
- [Visual C++ Tools and Features in Visual Studio Editions](visual-cpp-tools-and-features-in-visual-studio-editions.md)
42-
- [Getting Started](/visualstudio/ide/getting-started-with-cpp-in-visual-studio)
44+
[Visual C++ Tools and Features in Visual Studio Editions](visual-cpp-tools-and-features-in-visual-studio-editions.md)\
45+
[Getting Started](/visualstudio/ide/getting-started-with-cpp-in-visual-studio)

0 commit comments

Comments
 (0)