From 940ba87ad0c99931e0a897fb5ae7cf186976ada9 Mon Sep 17 00:00:00 2001 From: Zack Johnson Date: Fri, 17 Jul 2026 11:26:04 -0400 Subject: [PATCH 01/20] Document Managed C++ support limitations for ASan Add section on Managed C++ limitations with ASan. --- docs/sanitizers/asan-known-issues.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/sanitizers/asan-known-issues.md b/docs/sanitizers/asan-known-issues.md index 7d3b22a2e7a..adbe9f72ae7 100644 --- a/docs/sanitizers/asan-known-issues.md +++ b/docs/sanitizers/asan-known-issues.md @@ -105,6 +105,12 @@ On x64, MSVC ASan's [shadow bytes](./asan-shadow-bytes.md) region occupies sever The Visual Studio debugger handles this gracefully, and doesn't show these traces. However, debuggers like WinDbgX may break on every exception by default. Disabling breaking on first-chance exceptions is recommended. For example, in WinDbgX, this corresponds to the [`sxd av`](/windows-hardware/drivers/debuggercmds/sx--sxd--sxe--sxi--sxn--sxr--sx---set-exceptions-) command. +## Managed C++ is not fully supported + +An image built with both `/fsanitize=address` and `/clr` may link and start, and native code that is normally compiled with AddressSanitizer can still report memory-safety errors when it is called from C++/CLI code. + +However, in managed C++ (C++/CLI or applications compiled with /clr), ASan support is limited to native code. Managed method bodies, managed objects, JIT-generated code, garbage-collected memory, managed thread startup, finalizers, and CLR shutdown/unload behavior are owned by the CLR and aren't guaranteed to have ASan load/store instrumentation. For reliable ASan diagnostics, put memory-augmenting implementation code in native translation units or native DLLs that are compiled normally with `/fsanitize=address`, and call that code from C++/CLI wrapper code. + ## See also [AddressSanitizer overview](asan.md)\ From 5458dc5e6be8a79536595fa348188b2e19acfd45 Mon Sep 17 00:00:00 2001 From: Zack Johnson Date: Fri, 17 Jul 2026 12:02:46 -0400 Subject: [PATCH 02/20] Update ASan known issues for C++/CLI support Clarify limitations of ASan support for C++/CLI and provide additional notes on potential misleading reports. --- docs/sanitizers/asan-known-issues.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/sanitizers/asan-known-issues.md b/docs/sanitizers/asan-known-issues.md index adbe9f72ae7..fc9cc75f91a 100644 --- a/docs/sanitizers/asan-known-issues.md +++ b/docs/sanitizers/asan-known-issues.md @@ -109,7 +109,15 @@ The Visual Studio debugger handles this gracefully, and doesn't show these trace An image built with both `/fsanitize=address` and `/clr` may link and start, and native code that is normally compiled with AddressSanitizer can still report memory-safety errors when it is called from C++/CLI code. -However, in managed C++ (C++/CLI or applications compiled with /clr), ASan support is limited to native code. Managed method bodies, managed objects, JIT-generated code, garbage-collected memory, managed thread startup, finalizers, and CLR shutdown/unload behavior are owned by the CLR and aren't guaranteed to have ASan load/store instrumentation. For reliable ASan diagnostics, put memory-augmenting implementation code in native translation units or native DLLs that are compiled normally with `/fsanitize=address`, and call that code from C++/CLI wrapper code. +However, ASan support for C++/CLI is limited to normally compiled native code. C++/CLI method bodies, managed objects, JIT-generated code, garbage-collected memory, managed thread startup, finalizers, and CLR shutdown or unload behavior are owned by the CLR and aren't guaranteed to have ASan load/store instrumentation. For reliable ASan diagnostics, put memory-unsafe implementation code in native translation units or native DLLs that are compiled normally with `/fsanitize=address`, and call that code from C++/CLI wrapper code. + +For applications that continue running, you may experience misleading ASan reports or missed coverage: + +- Native-looking STL code compiled as C++/CLI may miss coverage. Even though the source looks identical, accesses emitted in the C++/CLI method body may not have native ASan load/store checks. +- Managed array bounds errors are reported by the CLR, not ASan. A managed out-of-range access should be expected to produce CLR behavior such as `IndexOutOfRangeException`, not an `ERROR: AddressSanitizer` report. +- Code running on CLR-created managed threads may miss ASan diagnostics for memory accesses emitted inside C++/CLI method bodies. The thread transition completing only proves the CLR transition worked; it doesn't prove the method body is ASan-covered. +- C++/CLI finalizers and normal C++/CLI process teardown are CLR-owned and order-dependent. Failures or reports during finalization, shutdown, or mixed-mode unload shouldn't be interpreted as reliable ASan diagnostics for user memory bugs. +- Loading an ASan-enabled C++/CLI wrapper DLL from a native host can produce misleading runtime failures, such as ASan access-violation reports on unknown addresses. ## See also From e3448c0c8e9d048903069e3cb6ed1ec067b6cec9 Mon Sep 17 00:00:00 2001 From: Zack Johnson Date: Mon, 20 Jul 2026 10:27:09 -0400 Subject: [PATCH 03/20] Apply suggestions from code review Co-authored-by: learn-build-service-prod-09[bot] <274431102+learn-build-service-prod-09[bot]@users.noreply.github.com> --- docs/sanitizers/asan-known-issues.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/sanitizers/asan-known-issues.md b/docs/sanitizers/asan-known-issues.md index fc9cc75f91a..0e07801f498 100644 --- a/docs/sanitizers/asan-known-issues.md +++ b/docs/sanitizers/asan-known-issues.md @@ -105,17 +105,17 @@ On x64, MSVC ASan's [shadow bytes](./asan-shadow-bytes.md) region occupies sever The Visual Studio debugger handles this gracefully, and doesn't show these traces. However, debuggers like WinDbgX may break on every exception by default. Disabling breaking on first-chance exceptions is recommended. For example, in WinDbgX, this corresponds to the [`sxd av`](/windows-hardware/drivers/debuggercmds/sx--sxd--sxe--sxi--sxn--sxr--sx---set-exceptions-) command. -## Managed C++ is not fully supported +## Managed C++ isn't fully supported -An image built with both `/fsanitize=address` and `/clr` may link and start, and native code that is normally compiled with AddressSanitizer can still report memory-safety errors when it is called from C++/CLI code. +An image built with both `/fsanitize=address` and `/clr` might link and start. Native code that's normally compiled with AddressSanitizer can still report memory-safety errors when C++/CLI code calls it. -However, ASan support for C++/CLI is limited to normally compiled native code. C++/CLI method bodies, managed objects, JIT-generated code, garbage-collected memory, managed thread startup, finalizers, and CLR shutdown or unload behavior are owned by the CLR and aren't guaranteed to have ASan load/store instrumentation. For reliable ASan diagnostics, put memory-unsafe implementation code in native translation units or native DLLs that are compiled normally with `/fsanitize=address`, and call that code from C++/CLI wrapper code. +However, ASan support for C++/CLI is limited to normally compiled native code. The CLR owns C++/CLI method bodies, managed objects, JIT-generated code, garbage-collected memory, managed thread startup, finalizers, and CLR shutdown or unload behavior. These components aren't guaranteed to have ASan load or store instrumentation. For reliable ASan diagnostics, put memory-unsafe implementation code in native translation units or native DLLs that are compiled normally with `/fsanitize=address`. Call that code from C++/CLI wrapper code. -For applications that continue running, you may experience misleading ASan reports or missed coverage: +For applications that continue running, you might see misleading ASan reports or missed coverage: -- Native-looking STL code compiled as C++/CLI may miss coverage. Even though the source looks identical, accesses emitted in the C++/CLI method body may not have native ASan load/store checks. -- Managed array bounds errors are reported by the CLR, not ASan. A managed out-of-range access should be expected to produce CLR behavior such as `IndexOutOfRangeException`, not an `ERROR: AddressSanitizer` report. -- Code running on CLR-created managed threads may miss ASan diagnostics for memory accesses emitted inside C++/CLI method bodies. The thread transition completing only proves the CLR transition worked; it doesn't prove the method body is ASan-covered. +- Native-looking STL code compiled as C++/CLI might miss coverage. Even though the source looks identical, accesses emitted in the C++/CLI method body might not have native ASan load or store checks. +- The CLR, not ASan, reports managed array bounds errors. A managed out-of-range access should be expected to produce CLR behavior such as `IndexOutOfRangeException`, not an `ERROR: AddressSanitizer` report. +- Code running on CLR-created managed threads might miss ASan diagnostics for memory accesses emitted inside C++/CLI method bodies. The thread transition completing only proves the CLR transition worked; it doesn't prove the method body is ASan-covered. - C++/CLI finalizers and normal C++/CLI process teardown are CLR-owned and order-dependent. Failures or reports during finalization, shutdown, or mixed-mode unload shouldn't be interpreted as reliable ASan diagnostics for user memory bugs. - Loading an ASan-enabled C++/CLI wrapper DLL from a native host can produce misleading runtime failures, such as ASan access-violation reports on unknown addresses. From 52b14efcc40e807fe9322968a5d7d934e1b14709 Mon Sep 17 00:00:00 2001 From: Zack Johnson Date: Wed, 29 Jul 2026 11:27:13 -0400 Subject: [PATCH 04/20] Update ASan known issues for C++/CLI support Tyler's feedback / improve wording for better understanding. --- docs/sanitizers/asan-known-issues.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/docs/sanitizers/asan-known-issues.md b/docs/sanitizers/asan-known-issues.md index 0e07801f498..0ba3b50ea39 100644 --- a/docs/sanitizers/asan-known-issues.md +++ b/docs/sanitizers/asan-known-issues.md @@ -107,18 +107,17 @@ The Visual Studio debugger handles this gracefully, and doesn't show these trace ## Managed C++ isn't fully supported -An image built with both `/fsanitize=address` and `/clr` might link and start. Native code that's normally compiled with AddressSanitizer can still report memory-safety errors when C++/CLI code calls it. +An image built with both `/fsanitize=address` and `/clr` might link and start. Native code that is compiled with ASan can still report memory-safety errors when C++/CLI code calls it. -However, ASan support for C++/CLI is limited to normally compiled native code. The CLR owns C++/CLI method bodies, managed objects, JIT-generated code, garbage-collected memory, managed thread startup, finalizers, and CLR shutdown or unload behavior. These components aren't guaranteed to have ASan load or store instrumentation. For reliable ASan diagnostics, put memory-unsafe implementation code in native translation units or native DLLs that are compiled normally with `/fsanitize=address`. Call that code from C++/CLI wrapper code. +However, ASan support for C++/CLI is limited to native code compiled without `/clr`. The CLR is responsible for memory mutating operations in C++/CLI methods, managed objects, JIT-generated code, garbage-collected memory, managed thread startup, finalizers, and CLR shutdown or unload behavior. These components aren't guaranteed to have ASan load or store instrumentation. For reliable ASan diagnostics, put memory-unsafe implementation code in native translation units or native DLLs that are compiled normally with `/fsanitize=address`. Call that code from C++/CLI wrapper code. -For applications that continue running, you might see misleading ASan reports or missed coverage: +For applications that run, you might see misleading ASan reports or missed coverage: -- Native-looking STL code compiled as C++/CLI might miss coverage. Even though the source looks identical, accesses emitted in the C++/CLI method body might not have native ASan load or store checks. -- The CLR, not ASan, reports managed array bounds errors. A managed out-of-range access should be expected to produce CLR behavior such as `IndexOutOfRangeException`, not an `ERROR: AddressSanitizer` report. -- Code running on CLR-created managed threads might miss ASan diagnostics for memory accesses emitted inside C++/CLI method bodies. The thread transition completing only proves the CLR transition worked; it doesn't prove the method body is ASan-covered. -- C++/CLI finalizers and normal C++/CLI process teardown are CLR-owned and order-dependent. Failures or reports during finalization, shutdown, or mixed-mode unload shouldn't be interpreted as reliable ASan diagnostics for user memory bugs. +- STL code compiled as C++/CLI might miss coverage. Even though the source looks identical to native C++, accesses emitted in the C++/CLI method body might not have native ASan load or store checks. +- The CLR, not ASan, reports managed array bounds errors. A managed out-of-range access produces CLR behavior such as `IndexOutOfRangeException`, not an `ERROR: AddressSanitizer` report. +- Code running on managed threads might miss ASan diagnostics for memory accesses emitted inside C++/CLI method bodies. Even if the CLR thread transition works, it doesn't prove the method body is ASan aware. +- C++/CLI finalizers and normal C++/CLI process teardown are maanged by the CLR and order-dependent. Don't interpret failures or reports during finalization, shutdown, or mixed-mode unload as reliable ASan diagnostics for user memory bugs. - Loading an ASan-enabled C++/CLI wrapper DLL from a native host can produce misleading runtime failures, such as ASan access-violation reports on unknown addresses. - ## See also [AddressSanitizer overview](asan.md)\ From 5967d883137580767dd4f3e1c7f12816aeb21e1f Mon Sep 17 00:00:00 2001 From: Tyler Whitney Date: Wed, 29 Jul 2026 10:01:16 -0700 Subject: [PATCH 05/20] Apply suggestion from @learn-build-service-prod-02[bot] Co-authored-by: learn-build-service-prod-02[bot] <274428175+learn-build-service-prod-02[bot]@users.noreply.github.com> --- docs/sanitizers/asan-known-issues.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sanitizers/asan-known-issues.md b/docs/sanitizers/asan-known-issues.md index 0ba3b50ea39..cbb610e233c 100644 --- a/docs/sanitizers/asan-known-issues.md +++ b/docs/sanitizers/asan-known-issues.md @@ -116,7 +116,7 @@ For applications that run, you might see misleading ASan reports or missed cover - STL code compiled as C++/CLI might miss coverage. Even though the source looks identical to native C++, accesses emitted in the C++/CLI method body might not have native ASan load or store checks. - The CLR, not ASan, reports managed array bounds errors. A managed out-of-range access produces CLR behavior such as `IndexOutOfRangeException`, not an `ERROR: AddressSanitizer` report. - Code running on managed threads might miss ASan diagnostics for memory accesses emitted inside C++/CLI method bodies. Even if the CLR thread transition works, it doesn't prove the method body is ASan aware. -- C++/CLI finalizers and normal C++/CLI process teardown are maanged by the CLR and order-dependent. Don't interpret failures or reports during finalization, shutdown, or mixed-mode unload as reliable ASan diagnostics for user memory bugs. +- C++/CLI finalizers and normal C++/CLI process teardown are managed by the CLR and order-dependent. Don't interpret failures or reports during finalization, shutdown, or mixed-mode unload as reliable ASan diagnostics for user memory bugs. - Loading an ASan-enabled C++/CLI wrapper DLL from a native host can produce misleading runtime failures, such as ASan access-violation reports on unknown addresses. ## See also From 8a7aa709d276db7e1a6b50766babf340e707f7d1 Mon Sep 17 00:00:00 2001 From: Tyler Whitney Date: Tue, 18 Aug 2026 16:25:25 -0700 Subject: [PATCH 06/20] Revise ASan known issues and update documentation date Revised the section on ASan support for C++/CLI to clarify limitations and diagnostics. --- docs/sanitizers/asan-known-issues.md | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/docs/sanitizers/asan-known-issues.md b/docs/sanitizers/asan-known-issues.md index cbb610e233c..76cf34d7a15 100644 --- a/docs/sanitizers/asan-known-issues.md +++ b/docs/sanitizers/asan-known-issues.md @@ -1,7 +1,7 @@ --- title: "AddressSanitizer known issues and limitations" description: "Technical description of the AddressSanitizer for Microsoft C/C++ known issues." -ms.date: 11/19/2025 +ms.date: 8/18/2026 helpviewer_keywords: ["AddressSanitizer known issues"] --- @@ -105,19 +105,18 @@ On x64, MSVC ASan's [shadow bytes](./asan-shadow-bytes.md) region occupies sever The Visual Studio debugger handles this gracefully, and doesn't show these traces. However, debuggers like WinDbgX may break on every exception by default. Disabling breaking on first-chance exceptions is recommended. For example, in WinDbgX, this corresponds to the [`sxd av`](/windows-hardware/drivers/debuggercmds/sx--sxd--sxe--sxi--sxn--sxr--sx---set-exceptions-) command. -## Managed C++ isn't fully supported +## ASan support for C++/CLI is experimental -An image built with both `/fsanitize=address` and `/clr` might link and start. Native code that is compiled with ASan can still report memory-safety errors when C++/CLI code calls it. +For reliable AddressSanitizer (ASan) diagnostics, isolate memory-unsafe code in native translation units or DLLs compiled without `/clr` and with `/fsanitize=address`. Call the native code from C++/CLI wrappers. -However, ASan support for C++/CLI is limited to native code compiled without `/clr`. The CLR is responsible for memory mutating operations in C++/CLI methods, managed objects, JIT-generated code, garbage-collected memory, managed thread startup, finalizers, and CLR shutdown or unload behavior. These components aren't guaranteed to have ASan load or store instrumentation. For reliable ASan diagnostics, put memory-unsafe implementation code in native translation units or native DLLs that are compiled normally with `/fsanitize=address`. Call that code from C++/CLI wrapper code. +The CLR manages memory and JIT-generated code, so C++/CLI code isn't guaranteed to receive ASan load and store instrumentation. As a result: -For applications that run, you might see misleading ASan reports or missed coverage: +• C++/CLI and STL code: Memory accesses within C++/CLI methods might not be instrumented, including accesses performed by STL code. +• Managed arrays: Out-of-range access produces CLR behavior, such as `IndexOutOfRangeException`, rather than an ERROR: AddressSanitizer report. +• Managed threads: Native memory accesses emitted within C++/CLI method bodies might not produce ASan diagnostics. +• Finalization and shutdown: Reports during finalization, process shutdown, or mixed-mode unloading might not reliably indicate user-code memory bugs. +• Native hosts: Loading an ASan-enabled C++/CLI wrapper DLL from a native host might produce misleading runtime failures, such as access-violation reports for unknown addresses. -- STL code compiled as C++/CLI might miss coverage. Even though the source looks identical to native C++, accesses emitted in the C++/CLI method body might not have native ASan load or store checks. -- The CLR, not ASan, reports managed array bounds errors. A managed out-of-range access produces CLR behavior such as `IndexOutOfRangeException`, not an `ERROR: AddressSanitizer` report. -- Code running on managed threads might miss ASan diagnostics for memory accesses emitted inside C++/CLI method bodies. Even if the CLR thread transition works, it doesn't prove the method body is ASan aware. -- C++/CLI finalizers and normal C++/CLI process teardown are managed by the CLR and order-dependent. Don't interpret failures or reports during finalization, shutdown, or mixed-mode unload as reliable ASan diagnostics for user memory bugs. -- Loading an ASan-enabled C++/CLI wrapper DLL from a native host can produce misleading runtime failures, such as ASan access-violation reports on unknown addresses. ## See also [AddressSanitizer overview](asan.md)\ From dd1413624a987c09071059cb6c9cc3be1748e723 Mon Sep 17 00:00:00 2001 From: Tyler Whitney Date: Tue, 18 Aug 2026 17:17:07 -0700 Subject: [PATCH 07/20] Update docs/sanitizers/asan-known-issues.md Co-authored-by: learn-build-service-prod-02[bot] <274428175+learn-build-service-prod-02[bot]@users.noreply.github.com> --- docs/sanitizers/asan-known-issues.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/sanitizers/asan-known-issues.md b/docs/sanitizers/asan-known-issues.md index 76cf34d7a15..15c9243f84a 100644 --- a/docs/sanitizers/asan-known-issues.md +++ b/docs/sanitizers/asan-known-issues.md @@ -107,7 +107,8 @@ The Visual Studio debugger handles this gracefully, and doesn't show these trace ## ASan support for C++/CLI is experimental -For reliable AddressSanitizer (ASan) diagnostics, isolate memory-unsafe code in native translation units or DLLs compiled without `/clr` and with `/fsanitize=address`. Call the native code from C++/CLI wrappers. +For reliable AddressSanitizer (ASan) diagnostics, isolate memory-unsafe code in native translation units or DLLs compiled without `/clr` and with `/fsanitize=address`. Call the native code from C++/CLI wrappers. + The CLR manages memory and JIT-generated code, so C++/CLI code isn't guaranteed to receive ASan load and store instrumentation. As a result: From 8b96415f84c8cf794bca739c9bba74d179b11248 Mon Sep 17 00:00:00 2001 From: "learn-build-service-prod[bot]" <113403604+learn-build-service-prod[bot]@users.noreply.github.com> Date: Thu, 20 Aug 2026 00:52:19 +0700 Subject: [PATCH 08/20] Confirm merge from FromPublicMasterBranch to main to sync with https://github.com/MicrosoftDocs/cpp-docs (branch main) (#6788) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update Vectorized STL algorithm documentation to reflect the current stae (#5937) Since the last update: * ARM64 and ARM64EC vectorization was added. Mention of x64 and x86 is removed, as vectorization is now supported on any target, except deprecated `/clr:pure` and `/clr:safe` modes. * `includes` is now manually vectorized too * `replace_copy` is now manually vectorized too Also moved `find_end` to `search` / `search_n` group, where it fits better. * Update header-files-cpp.md (#5938) Clarify intent of section * Update documentation on accessing System.String characters (#5940) * Update documentation on accessing System.String characters Added important note about treating interior pointers as const and linked to unsafe code best practices. * Update docs/dotnet/how-to-access-characters-in-a-system-string.md Co-authored-by: Jan Kotas * Apply suggestions from code review Co-authored-by: Aaron R Robinson * Apply suggestions from code review Co-authored-by: Aaron R Robinson --------- Co-authored-by: Jan Kotas * Clarify version prefix for Visual Studio Command Prompt (#5946) Updated instructions for starting Visual Studio Command Prompt to reflect changes in version specification. * Add new ARM64 feature arguments to documentation (#5950) Add new extensions `cssc` and `faminmax` to the `/feature` flag arguments documentation * atexit: Clarify DLL behavior is the same as _onexit (#5952) * atexit: Clarify DLL behavior is the same as _onexit - Document that atexit called from within a DLL will register the routine to run when the DLL is unloaded. atexit is a wrapper around _onexit which already documents this behavior. Ref: https://github.com/curl/curl/pull/22383#discussion_r3753438017 Reported-by: Michał Petryka Closes #xxxx * Revise atexit documentation for accuracy Update the date and clarify DLL behavior for atexit. --------- Co-authored-by: Tyler Whitney --------- Co-authored-by: learn-build-service-prod[bot] <113403604+learn-build-service-prod[bot]@users.noreply.github.com> Co-authored-by: Learn Build Service GitHub App Co-authored-by: Alex Guteniev Co-authored-by: veganaiZe <7102064+veganaiZe@users.noreply.github.com> Co-authored-by: Aaron R Robinson Co-authored-by: Jan Kotas Co-authored-by: Eric Brumer Co-authored-by: Vít Knobloch <67308900+vitknobloch@users.noreply.github.com> Co-authored-by: Jay Satiro Co-authored-by: Tyler Whitney --- docs/build/reference/feature-arm64.md | 2 ++ docs/c-runtime-library/reference/atexit.md | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/build/reference/feature-arm64.md b/docs/build/reference/feature-arm64.md index 2954b4fed11..63869f6bbc4 100644 --- a/docs/build/reference/feature-arm64.md +++ b/docs/build/reference/feature-arm64.md @@ -16,6 +16,8 @@ To enable one or more features the targeted ARM64 extension supports, specify on | Feature argument | Feature identifier | Optional from | Enabled by default | Description | Supported in version |--|--|--|--|--|--| +|**`cssc`** | `FEAT_CSSC` | Armv8.7 | Armv8.9 | Common Short Sequence Compression instructions. | Visual Studio 2026 18.10 (14.52) +|**`faminmax`** | `FEAT_FAMINMAX` | Armv9.2 | Armv9.5 | Floating-point maximum and minimum absolute value instructions. | Visual Studio 2026 18.10 (14.52) |**`lse`** | `FEAT_LSE` | Armv8.0 | Armv8.1 | Large System Extensions. | Visual Studio 2022 17.10 |**`rcpc`** | `FEAT_LRCPC` | Armv8.2 | Armv8.3 | Load-Acquire RCpc instructions. | Visual Studio 2022 17.10 |**`rcpc2`** | `FEAT_LRCPC2` | Armv8.2 | Armv8.4 | Load-Acquire RCpc instructions v2. | Visual Studio 2022 17.11 diff --git a/docs/c-runtime-library/reference/atexit.md b/docs/c-runtime-library/reference/atexit.md index 1264498d49f..f3fa82b4a7d 100644 --- a/docs/c-runtime-library/reference/atexit.md +++ b/docs/c-runtime-library/reference/atexit.md @@ -1,7 +1,7 @@ --- description: "Learn more about: atexit" title: "atexit" -ms.date: "11/04/2016" +ms.date: "8/18/2026" api_name: ["atexit"] api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"] api_type: ["DLLExport"] @@ -36,6 +36,8 @@ The **`atexit`** function is passed the address of a function *`func`* to be cal The code in the **`atexit`** function shouldn't contain any dependency on any DLL that could have already been unloaded when the **`atexit`** function is called. +**Microsoft-specific DLL behavior**: When a DLL unloads, after `DLLMain` receives `DLL_PROCESS_DETACH`, the DLL's `atexit` callbacks run in reverse registration order, with the last callback registered running first. + To generate an ANSI-conformant application, use the ANSI-standard **`atexit`** function (rather than the similar **`_onexit`** function). ## Requirements From fda2706c26008425ec6e4cbc615c9865c9f79092 Mon Sep 17 00:00:00 2001 From: Tim Sherer <28902327+TimShererWithAquent@users.noreply.github.com> Date: Wed, 19 Aug 2026 10:58:04 -0700 Subject: [PATCH 09/20] UUF Fix for "Walkthrough: Create and use a static library" (5 of 10) (#6769) * UUF Fix. * Remove duplicate customer intent from documentation Removed duplicate customer intent line from the metadata section. * Apply suggestions from code review Co-authored-by: learn-build-service-prod-02[bot] <274428175+learn-build-service-prod-02[bot]@users.noreply.github.com> * Update per comment. * Apply suggestions from code review Co-authored-by: learn-build-service-prod-02[bot] <274428175+learn-build-service-prod-02[bot]@users.noreply.github.com> --------- Co-authored-by: learn-build-service-prod-02[bot] <274428175+learn-build-service-prod-02[bot]@users.noreply.github.com> --- ...creating-and-using-a-static-library-cpp.md | 104 +++++++++--------- 1 file changed, 54 insertions(+), 50 deletions(-) diff --git a/docs/build/walkthrough-creating-and-using-a-static-library-cpp.md b/docs/build/walkthrough-creating-and-using-a-static-library-cpp.md index 6ca15699093..80c6daafcfe 100644 --- a/docs/build/walkthrough-creating-and-using-a-static-library-cpp.md +++ b/docs/build/walkthrough-creating-and-using-a-static-library-cpp.md @@ -1,14 +1,15 @@ --- title: "Walkthrough: Create and use a static library (C++)" -description: "Use C++ to create a static library (.lib) in Visual Studio." +description: Learn to create and use a static library in C++ using Visual Studio. This walkthrough covers building a .lib file, adding a class, and referencing it in an app. ms.custom: "get-started-article" -ms.date: 10/28/2021 +ms.date: 07/14/2026 helpviewer_keywords: ["libraries [C++], static", "static libraries [C++]"] ms.assetid: 3cc36411-7d66-4240-851e-dacb9a8fd6ac +#customer intent: As a C++ developer, I want to create a static library in Visual Studio, so that I can reuse common code across multiple apps. --- # Walkthrough: Create and use a static library -This step-by-step walkthrough shows how to create a static library (.lib file) for use with C++ apps. Using a static library is a great way to reuse code. Rather than reimplementing the same routines in every app that requires the functionality, you write them one time in a static library and then reference it from the apps. Code linked from a static library becomes part of your app—you don't have to install another file to use the code. +This step-by-step walkthrough shows how to create a static library (.lib file) for use with C++ apps. Using a static library is a great way to reuse code. Rather than reimplementing the same routines in every app that requires the functionality, write them one time in a static library and then reference it from the apps. Code linked from a static library becomes part of your app. You don't have to install another file to use the code. This walkthrough covers these tasks: @@ -32,19 +33,19 @@ The instructions for how to create the project vary depending on your version of ::: moniker range=">=msvc-160" -### To create a static library project in Visual Studio +To create a static library project in Visual Studio: -1. On the menu bar, choose **File** > **New** > **Project** to open the **Create a New Project** dialog. +1. On the menu bar, choose **File** > **New** > **Project** to open the **Create a new project** dialog. 1. At the top of the dialog, set **Language** to **C++**, set **Platform** to **Windows**, and set **Project type** to **Library**. -1. From the filtered list of project types, select **Windows Desktop Wizard**, then choose **Next**. +1. From the filtered list of project types, select **Windows Desktop Wizard**, and then choose **Next**. 1. In the **Configure your new project** page, enter *MathLibrary* in the **Project name** box to specify a name for the project. Enter *StaticMath* in the **Solution name** box. Choose the **Create** button to open the **Windows Desktop Project** dialog. 1. In the **Windows Desktop Project** dialog, under **Application type**, select **Static Library (.lib)**. -1. Under **Additional options**, uncheck the **Precompiled header** check box if it's checked. Check the **Empty project** box. +1. Under **Additional options**, clear the **Precompiled header** check box if it's selected. Select **Empty project**. 1. Choose **OK** to create the project. @@ -52,17 +53,17 @@ The instructions for how to create the project vary depending on your version of ::: moniker range="msvc-150" -### To create a static library project in Visual Studio 2017 +To create a static library project in Visual Studio 2017: 1. On the menu bar, choose **File** > **New** > **Project**. -1. In the **New Project** dialog box, select **Installed** > **Visual C++** > **Windows Desktop**. In the center pane, select **Windows Desktop Wizard**. +1. In the **New Project** dialog, select **Installed** > **Visual C++** > **Windows Desktop**. In the center pane, select **Windows Desktop Wizard**. -1. Specify a name for the project—for example, *MathLibrary*—in the **Name** box. Specify a name for the solution—for example, *StaticMath*—in the **Solution Name** box. Choose the **OK** button. +1. Specify a name for the project, such as *MathLibrary*, in the **Name** box. Specify a name for the solution, such as *StaticMath*, in the **Solution Name** box. Choose **OK**. 1. In the **Windows Desktop Project** dialog, under **Application type**, select **Static Library (.lib)**. -1. Under **Additional Options**, uncheck the **Precompiled header** check box if it's checked. Check the **Empty project** box. +1. Under **Additional Options**, clear the **Precompiled header** check box if it's selected. Select **Empty project**. 1. Choose **OK** to create the project. @@ -70,27 +71,27 @@ The instructions for how to create the project vary depending on your version of ::: moniker range="msvc-140" -### To create a static library project in Visual Studio 2015 +To create a static library project in Visual Studio 2015: 1. On the menu bar, choose **File** > **New** > **Project**. -1. In the **New Project** dialog box, select **Installed** > **Templates** > **Visual C++** > **Win32**. In the center pane, select **Win32 Console Application**. +1. In the **New Project** dialog, select **Installed** > **Templates** > **Visual C++** > **Win32**. In the center pane, select **Win32 Console Application**. -1. Specify a name for the project—for example, *MathLibrary*—in the **Name** box. Specify a name for the solution—for example, *StaticMath*—in the **Solution Name** box. Choose the **OK** button. +1. Specify a name for the project, such as *MathLibrary*, in the **Name** box. Specify a name for the solution, such as *StaticMath*, in the **Solution Name** box. Choose **OK**. 1. In the **Win32 Application Wizard**, choose **Next**. -1. In the **Application Settings** page, under **Application type**, select **Static library**. Under **Additional options**, uncheck the **Precompiled header** checkbox. Choose **Finish** to create the project. +1. In the **Application Settings** page, under **Application type**, select **Static library**. Under **Additional options**, clear the **Precompiled header** checkbox. Choose **Finish** to create the project. ::: moniker-end ## Add a class to the static library -### To add a class to the static library +To add a class to the static library: -1. To create a header file for a new class, right-click to open the shortcut menu for the **MathLibrary** project in **Solution Explorer**, and then choose **Add** > **New Item**. +1. Create a header file for a new class. In **Solution Explorer**, right-click **MathLibrary** to open the context menu for the project. Select **Add** > **New Item**. -1. In the **Add New Item** dialog box, select **Visual C++** > **Code**. In the center pane, select **Header File (.h)**. Specify a name for the header file—for example, *MathLibrary.h*—and then choose the **Add** button. A nearly blank header file is displayed. +1. In the **Add New Item** dialog, select **Visual C++** > **Code**. In the center pane, select **Header File (.h)**. Specify a name for the header file, such as *MathLibrary.h*, and then select **Add**. A nearly blank header file is displayed. 1. Add a declaration for a class named `Arithmetic` to do common mathematical operations such as addition, subtraction, multiplication, and division. The code should resemble: @@ -118,9 +119,9 @@ The instructions for how to create the project vary depending on your version of } ``` -1. To create a source file for the new class, open the shortcut menu for the **MathLibrary** project in **Solution Explorer**, and then choose **Add** > **New Item**. +1. To create a source file for the new class, open the context menu for the **MathLibrary** project in **Solution Explorer**, and then choose **Add** > **New Item**. -1. In the **Add New Item** dialog box, in the center pane, select **C++ File (.cpp)**. Specify a name for the source file—for example, *MathLibrary.cpp*—and then choose the **Add** button. A blank source file is displayed. +1. In the **Add New Item** dialog, in the center pane, select **C++ File (.cpp)**. Specify a name for the source file, such as *MathLibrary.cpp*. Then select **Add**. A blank source file is displayed. 1. Use this source file to implement the functionality for class `Arithmetic`. The code should resemble: @@ -155,42 +156,45 @@ The instructions for how to create the project vary depending on your version of } ``` -1. To build the static library, select **Build** > **Build Solution** on the menu bar. The build creates a static library, *MathLibrary.lib*, that can be used by other programs. +1. To build the static library, select **Build** > **Build Solution** on the menu bar. The build creates a static library, *MathLibrary.lib*, that other programs can use. > [!NOTE] - > When you build on the Visual Studio command line, you must build the program in two steps. First, run `cl /c /EHsc MathLibrary.cpp` to compile the code and create an object file that's named *MathLibrary.obj*. (The `cl` command invokes the compiler, Cl.exe, and the `/c` option specifies compile without linking. For more information, see [/c (Compile Without Linking)](../build/reference/c-compile-without-linking.md).) Second, run `lib MathLibrary.obj` to link the code and create the static library *MathLibrary.lib*. (The `lib` command invokes the Library Manager, Lib.exe. For more information, see [LIB Reference](../build/reference/lib-reference.md).) + > When you build on the Visual Studio command line, you must build the program in two steps. + > + > 1. Run `cl /c /EHsc MathLibrary.cpp` to compile the code and create an object file named *MathLibrary.obj*. The `cl` command invokes the compiler, Cl.exe, and the `/c` option specifies compile without linking. For more information, see [/c (Compile Without Linking)](../build/reference/c-compile-without-linking.md). + > 1. Run `lib MathLibrary.obj` to link the code and create the static library *MathLibrary.lib*. The `lib` command invokes the Library Manager, Lib.exe. For more information, see [LIB Reference](../build/reference/lib-reference.md). ## Create a C++ console app that references the static library ::: moniker range=">=msvc-160" -### To create a C++ console app that references the static library in Visual Studio +To create a C++ console app that references the static library in Visual Studio: -1. In **Solution Explorer**, right-click on the top node, **Solution 'StaticMath'**, to open the shortcut menu. Choose **Add** > **New Project** to open the **Add a New Project** dialog. +1. In **Solution Explorer**, right-click on the top node, **Solution 'StaticMath'**, to open the context menu. Choose **Add** > **New Project** to open the **Add a New Project** dialog. 1. At the top of the dialog, set the **Project type** filter to **Console**. -1. From the filtered list of project types, choose **Console App** then choose **Next**. In the next page, enter *MathClient* in the **Name** box to specify a name for the project. +1. From the filtered list of project types, choose **Console App** then choose **Next**. In the next page, enter *MathClient* as the name for the project. -1. Choose the **Create** button to create the client project. +1. Choose **Create** to create the client project. -1. After you create a console app, an empty program is created for you. The name for the source file is the same as the name that you chose earlier. In the example, it's named `MathClient.cpp`. + After you create a console app, an empty program is created for you. The name for the source file is the same as the name that you chose earlier. In the example, it's named `MathClient.cpp`. ::: moniker-end ::: moniker range="msvc-150" -### To create a C++ console app that references the static library in Visual Studio 2017 +To create a C++ console app that references the static library in Visual Studio 2017: -1. In **Solution Explorer**, right-click on the top node, **Solution 'StaticMath'**, to open the shortcut menu. Choose **Add** > **New Project** to open the **Add a New Project** dialog box. +1. In **Solution Explorer**, right-click on the top node, **Solution 'StaticMath'**, to open the context menu. Choose **Add** > **New Project** to open the **Add a New Project** dialog. -1. In the **Add New Project** dialog box, select **Installed** > **Visual C++** > **Windows Desktop**. In the center pane, select **Windows Desktop Wizard**. +1. In the **Add New Project** dialog, select **Installed** > **Visual C++** > **Windows Desktop**. In the center pane, select **Windows Desktop Wizard**. 1. Specify a name for the project—for example, *MathClient*—in the **Name** box. Choose the **OK** button. 1. In the **Windows Desktop Project** dialog, under **Application type**, select **Console Application (.exe)**. -1. Under **Additional Options**, uncheck the **Precompiled header** check box if it's checked. +1. Under **Additional Options**, clear the **Precompiled header** check box if it's selected. 1. Choose **OK** to create the project. @@ -200,35 +204,35 @@ The instructions for how to create the project vary depending on your version of ::: moniker range="msvc-140" -### To create a C++ console app that references the static library in Visual Studio 2015 +To create a C++ console app that references the static library in Visual Studio 2015: -1. In **Solution Explorer**, right-click on the top node, **Solution 'StaticMath'**, to open the shortcut menu. Choose **Add** > **New Project** to open the **Add a New Project** dialog box. +1. In **Solution Explorer**, right-click on the top node, **Solution 'StaticMath'**, to open the context menu. Choose **Add** > **New Project** to open the **Add a New Project** dialog. -1. In the **Add New Project** dialog box, select **Installed** > **Visual C++** > **Win32**. In the center pane, select **Win32 Console Application**. +1. In the **Add New Project** dialog, select **Installed** > **Visual C++** > **Win32**. In the center pane, select **Win32 Console Application**. 1. Specify a name for the project—for example, *MathClient*—in the **Name** box. Choose the **OK** button. 1. In the **Win32 Application Wizard** dialog, choose **Next**. -1. On the **Application Settings** page, under **Application type**, make sure **Console application** is selected. Under **Additional options**, uncheck **Precompiled header**, then check the **Empty Project** checkbox. Choose **Finish** to create the project. +1. On the **Application Settings** page, under **Application type**, make sure **Console application** is selected. Under **Additional options**, clear **Precompiled header**, and then select **Empty Project**. Choose **Finish** to create the project. -1. To add a source file to the empty project, right-click to open the shortcut menu for the **MathClient** project in **Solution Explorer**, and then choose **Add** > **New Item**. +1. To add a source file to the empty project, right-click to open the context menu for the **MathClient** project in **Solution Explorer**, and then choose **Add** > **New Item**. -1. In the **Add New Item** dialog box, select **Visual C++** > **Code**. In the center pane, select **C++ File (.cpp)**. Specify a name for the source file—for example, *MathClient.cpp*—and then choose the **Add** button. A blank source file is displayed. +1. In the **Add New Item** dialog, select **Visual C++** > **Code**. In the center pane, select **C++ File (.cpp)**. Specify a name for the source file—for example, *MathClient.cpp*—and then choose the **Add** button. A blank source file is displayed. ::: moniker-end ## Use the functionality from the static library in the app -### To use the functionality from the static library in the app +To use the functionality from the static library in the app: -1. Before you can use the math routines in the static library, you must reference it. Open the shortcut menu for the **MathClient** project in **Solution Explorer**, and then choose **Add** > **Reference**. +1. Reference the static library before using the math routines in it. Open the context menu for the **MathClient** project in **Solution Explorer**, and then choose **Add** > **Reference**. -1. The **Add Reference** dialog box lists the libraries that you can reference. The **Projects** tab lists the projects in the current solution and any libraries they reference. Open the **Projects** tab, select the **MathLibrary** check box, and then choose the **OK** button. +1. The **Add Reference** dialog lists the libraries that you can reference. The **Projects** tab lists the projects in the current solution and any libraries they reference. Open the **Projects** tab, select **MathLibrary**, and then select **OK**. -1. To reference the `MathLibrary.h` header file, you must modify the included directories path. In **Solution Explorer**, right-click on **MathClient** to open the shortcut menu. Choose **Properties** to open the **MathClient Property Pages** dialog box. +1. Modify the included directories path to reference the `MathLibrary.h` header file. In **Solution Explorer**, right-click on **MathClient** to open the context menu. Choose **Properties** to open the **MathClient Property Pages** dialog. -1. In the **MathClient Property Pages** dialog box, set the **Configuration** drop-down to **All Configurations**. Set the **Platform** drop-down to **All Platforms**. +1. In the **MathClient Property Pages** dialog, set the **Configuration** value to **All Configurations**. Set **Platform** to **All Platforms**. 1. Select the **Configuration Properties** > **C/C++** > **General** property page. In the **Additional Include Directories** property, specify the path of the **MathLibrary** directory, or browse for it. @@ -236,13 +240,13 @@ The instructions for how to create the project vary depending on your version of 1. Open the **Additional Include Directories** property value drop-down list, and then choose **Edit**. - 1. In the **Additional Include Directories** dialog box, double-click in the top of the text box. Then choose the ellipsis button (**...**) at the end of the line. + 1. In the **Additional Include Directories** dialog, double-click in the top of the text box. Then choose the ellipsis button (**...**) at the end of the line. - 1. In the **Select Directory** dialog box, navigate up a level, and then select the **MathLibrary** directory. Then choose the **Select Folder** button to save your selection. + 1. In the **Select Directory** dialog, navigate up a level, and then select the **MathLibrary** directory. Then choose the **Select Folder** button to save your selection. - 1. In the **Additional Include Directories** dialog box, choose the **OK** button. + 1. In the **Additional Include Directories** dialog, choose the **OK** button. - 1. In the **Property Pages** dialog box, choose the **OK** button to save your changes to the project. + 1. In the **Property Pages** dialog, choose the **OK** button to save your changes to the project. 1. You can now use the `Arithmetic` class in this app by including the `#include "MathLibrary.h"` header in your code. Replace the contents of `MathClient.cpp` with this code: @@ -275,11 +279,11 @@ The instructions for how to create the project vary depending on your version of ## Run the app -### To run the app +To run the app: -1. Make sure that **MathClient** is selected as the default project. To select it, right-click to open the shortcut menu for **MathClient** in **Solution Explorer**, and then choose **Set as StartUp Project**. +1. Make sure that **MathClient** is selected as the default project. To select it, right-click **MathClient** in **Solution Explorer** to open the context menu, and then choose **Set as StartUp Project**. -1. To run the project, on the menu bar, choose **Debug** > **Start Without Debugging**. The output should resemble: +1. On the menu bar, choose **Debug** > **Start Without Debugging** to run the project. The output should resemble: ```Output a + b = 106.4 @@ -290,4 +294,4 @@ The instructions for how to create the project vary depending on your version of ## See also -[Walkthrough: Creating and Using a Dynamic Link Library (C++)](../build/walkthrough-creating-and-using-a-dynamic-link-library-cpp.md) \ No newline at end of file +[Walkthrough: Creating and Using a Dynamic Link Library (C++)](../build/walkthrough-creating-and-using-a-dynamic-link-library-cpp.md) From 9b55438a31b3d5879798851a603eaa29838b399a Mon Sep 17 00:00:00 2001 From: TylerMSFT <12305055+TylerMSFT@users.noreply.github.com> Date: Wed, 19 Aug 2026 13:50:07 -0700 Subject: [PATCH 10/20] minor fixes --- docs/c-runtime-library/reference/atexit.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/c-runtime-library/reference/atexit.md b/docs/c-runtime-library/reference/atexit.md index f3fa82b4a7d..bc23f551d51 100644 --- a/docs/c-runtime-library/reference/atexit.md +++ b/docs/c-runtime-library/reference/atexit.md @@ -28,27 +28,27 @@ Function to be called. ## Return value -**`atexit`** returns 0 if successful, or a nonzero value if an error occurs. +`atexit` returns 0 if successful, or a nonzero value if an error occurs. ## Remarks -The **`atexit`** function is passed the address of a function *`func`* to be called when the program terminates normally. Successive calls to **`atexit`** create a register of functions that are executed in last-in, first-out (LIFO) order. The functions passed to **`atexit`** can't take parameters. **`atexit`** and **`_onexit`** use the heap to hold the register of functions. Thus, the number of functions that can be registered is limited only by heap memory. +The `atexit` function is passed the address of a function *`func`* to be called when the program terminates normally. Successive calls to `atexit` create a register of functions that are executed in last-in, first-out (LIFO) order. The functions passed to `atexit` can't take parameters. `atexit` and `_onexit` use the heap to hold the register of functions. Thus, the number of functions that can be registered is limited only by heap memory. -The code in the **`atexit`** function shouldn't contain any dependency on any DLL that could have already been unloaded when the **`atexit`** function is called. +The code in the `atexit` function shouldn't contain any dependency on any DLL that could have already been unloaded when the `atexit` function is called. -**Microsoft-specific DLL behavior**: When a DLL unloads, after `DLLMain` receives `DLL_PROCESS_DETACH`, the DLL's `atexit` callbacks run in reverse registration order, with the last callback registered running first. +**Microsoft-specific DLL behavior**: When a DLL unloads, after `DllMain` receives `DLL_PROCESS_DETACH`, the DLL's `atexit` callbacks run in reverse registration order, with the last callback registered running first. -To generate an ANSI-conformant application, use the ANSI-standard **`atexit`** function (rather than the similar **`_onexit`** function). +To generate an ANSI-conformant application, use the ANSI-standard `atexit` function (rather than the similar `_onexit` function). ## Requirements | Routine | Required header | |---|---| -| **`atexit`** | `` | +| `atexit` | `` | ## Example -This program pushes four functions onto the stack of functions to be executed when **`atexit`** is called. When the program exits, these programs are executed on a last in, first out basis. +This program pushes four functions onto the stack of functions to be executed when `atexit` is called. When the program exits, these programs are executed on a last in, first out basis. ```C // crt_atexit.c From 81a8cada67597d9384f1669558772e8307067ff9 Mon Sep 17 00:00:00 2001 From: TylerMSFT <12305055+TylerMSFT@users.noreply.github.com> Date: Wed, 19 Aug 2026 13:57:17 -0700 Subject: [PATCH 11/20] note msvc version --- docs/build/reference/feature-arm64.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/build/reference/feature-arm64.md b/docs/build/reference/feature-arm64.md index 63869f6bbc4..b4a81178d93 100644 --- a/docs/build/reference/feature-arm64.md +++ b/docs/build/reference/feature-arm64.md @@ -16,8 +16,8 @@ To enable one or more features the targeted ARM64 extension supports, specify on | Feature argument | Feature identifier | Optional from | Enabled by default | Description | Supported in version |--|--|--|--|--|--| -|**`cssc`** | `FEAT_CSSC` | Armv8.7 | Armv8.9 | Common Short Sequence Compression instructions. | Visual Studio 2026 18.10 (14.52) -|**`faminmax`** | `FEAT_FAMINMAX` | Armv9.2 | Armv9.5 | Floating-point maximum and minimum absolute value instructions. | Visual Studio 2026 18.10 (14.52) +|**`cssc`** | `FEAT_CSSC` | Armv8.7 | Armv8.9 | Common Short Sequence Compression instructions. | Visual Studio 2026 18.10 (MSVC 14.52) +|**`faminmax`** | `FEAT_FAMINMAX` | Armv9.2 | Armv9.5 | Floating-point maximum and minimum absolute value instructions. | Visual Studio 2026 18.10 (MSVC 14.52) |**`lse`** | `FEAT_LSE` | Armv8.0 | Armv8.1 | Large System Extensions. | Visual Studio 2022 17.10 |**`rcpc`** | `FEAT_LRCPC` | Armv8.2 | Armv8.3 | Load-Acquire RCpc instructions. | Visual Studio 2022 17.10 |**`rcpc2`** | `FEAT_LRCPC2` | Armv8.2 | Armv8.4 | Load-Acquire RCpc instructions v2. | Visual Studio 2022 17.11 From 136a5f5ddb3aa8295fa17ab919bee6d1d86b30ea Mon Sep 17 00:00:00 2001 From: chcomley Date: Wed, 19 Aug 2026 13:58:33 -0700 Subject: [PATCH 12/20] Document cross-install MSVC toolset discovery --- docs/overview/acquire-msvc.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/docs/overview/acquire-msvc.md b/docs/overview/acquire-msvc.md index b70d02b277e..a919b5f4808 100644 --- a/docs/overview/acquire-msvc.md +++ b/docs/overview/acquire-msvc.md @@ -1,8 +1,9 @@ --- title: "Install the Microsoft C++ (MSVC) Build Tools" description: "Install the MSVC Build Tools using the Visual Studio Installer UI, command line, winget, or a .vsconfig file. Choose Preview, latest release, or an older in-support toolset, and target it from MSBuild, CMake, or the Visual Studio Command Prompt." -ms.date: 07/13/2026 +ms.date: 08/19/2026 ms.topic: how-to +ai-usage: ai-assisted ms.service: "visual-cpp" ms.subservice: "tools" ms.custom: intro-installation @@ -164,6 +165,22 @@ msbuild /p:Platform= /p:Configuration= / `` matches the folder name under `\VC\Tools\MSVC\`. +#### Discover an MSVC toolset in another installation + +> [!NOTE] +> Cross-install discovery requires Visual Studio version 18.8 or later. + +Visual Studio might find the requested `PlatformToolset` in the current installation even when that installation doesn't contain the exact `VCToolsVersion` you specified. To search all Visual Studio and Visual Studio Build Tools installations for the exact version, add the following properties to your `.vcxproj` file or a `Directory.Build.props` file: + +```xml + + true + 14.43.34604 + +``` + +With discovery enabled, Visual Studio selects a pinned version from another installation even when the current installation contains a different version of the same `PlatformToolset`. This behavior supports reproducible builds without manually setting `VCToolsInstallDir`. The requested MSVC toolset must already be installed on the machine. + To build with the MSVC preview tools, add `/p:MSVCPreviewEnabled=true`: ```cmd From aa72bb6302681adfae51dbed557c48a8b3769e36 Mon Sep 17 00:00:00 2001 From: Tyler Whitney Date: Wed, 19 Aug 2026 14:00:03 -0700 Subject: [PATCH 13/20] Apply suggestions from code review Co-authored-by: learn-build-service-prod-04[bot] <274428985+learn-build-service-prod-04[bot]@users.noreply.github.com> --- docs/c-runtime-library/reference/atexit.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/c-runtime-library/reference/atexit.md b/docs/c-runtime-library/reference/atexit.md index bc23f551d51..392566beb4d 100644 --- a/docs/c-runtime-library/reference/atexit.md +++ b/docs/c-runtime-library/reference/atexit.md @@ -32,9 +32,9 @@ Function to be called. ## Remarks -The `atexit` function is passed the address of a function *`func`* to be called when the program terminates normally. Successive calls to `atexit` create a register of functions that are executed in last-in, first-out (LIFO) order. The functions passed to `atexit` can't take parameters. `atexit` and `_onexit` use the heap to hold the register of functions. Thus, the number of functions that can be registered is limited only by heap memory. +The `atexit` function gets the address of a function *`func`* to call when the program terminates normally. Successive calls to `atexit` create a register of functions that execute in last-in, first-out (LIFO) order. The functions passed to `atexit` can't take parameters. `atexit` and `_onexit` use the heap to hold the register of functions. Thus, the number of functions you can register is limited only by heap memory. -The code in the `atexit` function shouldn't contain any dependency on any DLL that could have already been unloaded when the `atexit` function is called. +The code in the `atexit` function shouldn't contain any dependency on any DLL that could already be unloaded when the `atexit` function is called. **Microsoft-specific DLL behavior**: When a DLL unloads, after `DllMain` receives `DLL_PROCESS_DETACH`, the DLL's `atexit` callbacks run in reverse registration order, with the last callback registered running first. @@ -48,7 +48,7 @@ To generate an ANSI-conformant application, use the ANSI-standard `atexit` funct ## Example -This program pushes four functions onto the stack of functions to be executed when `atexit` is called. When the program exits, these programs are executed on a last in, first out basis. +This program pushes four functions onto the stack of functions to execute when `atexit` is called. When the program exits, it executes these functions in last-in, first-out order. ```C // crt_atexit.c From 8dd9d5e03c4f247a4a1ac8dce576a1d8a9a49853 Mon Sep 17 00:00:00 2001 From: Tyler Whitney Date: Wed, 19 Aug 2026 14:16:53 -0700 Subject: [PATCH 14/20] fix formatting --- docs/sanitizers/asan-known-issues.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/sanitizers/asan-known-issues.md b/docs/sanitizers/asan-known-issues.md index 15c9243f84a..8a1f9c387b7 100644 --- a/docs/sanitizers/asan-known-issues.md +++ b/docs/sanitizers/asan-known-issues.md @@ -112,11 +112,11 @@ For reliable AddressSanitizer (ASan) diagnostics, isolate memory-unsafe code in The CLR manages memory and JIT-generated code, so C++/CLI code isn't guaranteed to receive ASan load and store instrumentation. As a result: -• C++/CLI and STL code: Memory accesses within C++/CLI methods might not be instrumented, including accesses performed by STL code. -• Managed arrays: Out-of-range access produces CLR behavior, such as `IndexOutOfRangeException`, rather than an ERROR: AddressSanitizer report. -• Managed threads: Native memory accesses emitted within C++/CLI method bodies might not produce ASan diagnostics. -• Finalization and shutdown: Reports during finalization, process shutdown, or mixed-mode unloading might not reliably indicate user-code memory bugs. -• Native hosts: Loading an ASan-enabled C++/CLI wrapper DLL from a native host might produce misleading runtime failures, such as access-violation reports for unknown addresses. +- C++/CLI and STL code: Memory accesses within C++/CLI methods might not be instrumented, including accesses performed by STL code. +- Managed arrays: Out-of-range access produces CLR behavior, such as `IndexOutOfRangeException`, rather than an ERROR: AddressSanitizer report. +- Managed threads: Native memory accesses emitted within C++/CLI method bodies might not produce ASan diagnostics. +- Finalization and shutdown: Reports during finalization, process shutdown, or mixed-mode unloading might not reliably indicate user-code memory bugs. +- Native hosts: Loading an ASan-enabled C++/CLI wrapper DLL from a native host might produce misleading runtime failures, such as access-violation reports for unknown addresses. ## See also From 7e440a408efdb780cf530d7b65046b92d968ffc2 Mon Sep 17 00:00:00 2001 From: chcomley <35748196+chcomley@users.noreply.github.com> Date: Thu, 20 Aug 2026 12:25:31 -0700 Subject: [PATCH 15/20] Revise MSVC installation guide for clarity and date Updated the date and clarified the note about VCToolsVersion discovery in the MSVC installation guide. --- docs/overview/acquire-msvc.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/overview/acquire-msvc.md b/docs/overview/acquire-msvc.md index a919b5f4808..a8d5d03fa3f 100644 --- a/docs/overview/acquire-msvc.md +++ b/docs/overview/acquire-msvc.md @@ -1,7 +1,7 @@ --- title: "Install the Microsoft C++ (MSVC) Build Tools" description: "Install the MSVC Build Tools using the Visual Studio Installer UI, command line, winget, or a .vsconfig file. Choose Preview, latest release, or an older in-support toolset, and target it from MSBuild, CMake, or the Visual Studio Command Prompt." -ms.date: 08/19/2026 +ms.date: 08/20/2026 ms.topic: how-to ai-usage: ai-assisted ms.service: "visual-cpp" @@ -170,7 +170,7 @@ msbuild /p:Platform= /p:Configuration= / > [!NOTE] > Cross-install discovery requires Visual Studio version 18.8 or later. -Visual Studio might find the requested `PlatformToolset` in the current installation even when that installation doesn't contain the exact `VCToolsVersion` you specified. To search all Visual Studio and Visual Studio Build Tools installations for the exact version, add the following properties to your `.vcxproj` file or a `Directory.Build.props` file: +The current Visual Studio installation might not find the exact `VCToolsVersion` you specify. To search all Visaul Studio Build Tools installations, add the following properties to your `.vcxproj` file or a `Directory.Build.props` file: ```xml @@ -179,7 +179,7 @@ Visual Studio might find the requested `PlatformToolset` in the current installa ``` -With discovery enabled, Visual Studio selects a pinned version from another installation even when the current installation contains a different version of the same `PlatformToolset`. This behavior supports reproducible builds without manually setting `VCToolsInstallDir`. The requested MSVC toolset must already be installed on the machine. +With discovery enabled, Visual Studio finds the specified version, potentially from a different installation. This behavior supports reproducible builds without manually setting `VCToolsInstallDir`. The requested MSVC toolset must already be installed on the machine. To build with the MSVC preview tools, add `/p:MSVCPreviewEnabled=true`: From 783fc811726d08e6c84e22ecdb62ef9bfecba3bd Mon Sep 17 00:00:00 2001 From: chcomley <35748196+chcomley@users.noreply.github.com> Date: Thu, 20 Aug 2026 12:26:46 -0700 Subject: [PATCH 16/20] Update docs/overview/acquire-msvc.md Co-authored-by: learn-build-service-prod-05[bot] <274429479+learn-build-service-prod-05[bot]@users.noreply.github.com> --- docs/overview/acquire-msvc.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/overview/acquire-msvc.md b/docs/overview/acquire-msvc.md index a8d5d03fa3f..7de9d38d2e9 100644 --- a/docs/overview/acquire-msvc.md +++ b/docs/overview/acquire-msvc.md @@ -170,7 +170,7 @@ msbuild /p:Platform= /p:Configuration= / > [!NOTE] > Cross-install discovery requires Visual Studio version 18.8 or later. -The current Visual Studio installation might not find the exact `VCToolsVersion` you specify. To search all Visaul Studio Build Tools installations, add the following properties to your `.vcxproj` file or a `Directory.Build.props` file: +The current Visual Studio installation might not find the exact `VCToolsVersion` you specify. To search all Visual Studio Build Tools installations, add the following properties to your `.vcxproj` file or a `Directory.Build.props` file: ```xml From 868aa4763ca09f605a424e59af364183f862c1f6 Mon Sep 17 00:00:00 2001 From: chcomley <35748196+chcomley@users.noreply.github.com> Date: Thu, 20 Aug 2026 12:48:07 -0700 Subject: [PATCH 17/20] Update acquire-msvc.md --- docs/overview/acquire-msvc.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/overview/acquire-msvc.md b/docs/overview/acquire-msvc.md index 7de9d38d2e9..0acc6adb724 100644 --- a/docs/overview/acquire-msvc.md +++ b/docs/overview/acquire-msvc.md @@ -170,7 +170,7 @@ msbuild /p:Platform= /p:Configuration= / > [!NOTE] > Cross-install discovery requires Visual Studio version 18.8 or later. -The current Visual Studio installation might not find the exact `VCToolsVersion` you specify. To search all Visual Studio Build Tools installations, add the following properties to your `.vcxproj` file or a `Directory.Build.props` file: +The current Visual Studio installation might not find the exact `VCToolsVersion` you specify. To search all Visual Studio and Visual Studio Build Tools installations, add the following properties to your `.vcxproj` file or a `Directory.Build.props` file: ```xml From e870f554be98dcb5e27e8d080b686ddf5baa5bd7 Mon Sep 17 00:00:00 2001 From: Tyler Whitney Date: Thu, 20 Aug 2026 14:20:58 -0700 Subject: [PATCH 18/20] Document C++23 static call and subscript operators (#6791) * operator () * add static operator[] * Refine static subscript example * Apply suggestions from code review Co-authored-by: learn-build-service-prod-09[bot] <274431102+learn-build-service-prod-09[bot]@users.noreply.github.com> * Clarify static operator qualifiers --------- Co-authored-by: TylerMSFT <12305055+TylerMSFT@users.noreply.github.com> Co-authored-by: learn-build-service-prod-09[bot] <274431102+learn-build-service-prod-09[bot]@users.noreply.github.com> --- docs/cpp/function-call-cpp.md | 3 +- docs/cpp/static-function-call-operator.md | 88 +++++++++++++++++++++++ docs/cpp/static-subscript-operator.md | 70 ++++++++++++++++++ docs/cpp/subscripting.md | 5 +- docs/cpp/toc.yml | 4 ++ 5 files changed, 168 insertions(+), 2 deletions(-) create mode 100644 docs/cpp/static-function-call-operator.md create mode 100644 docs/cpp/static-subscript-operator.md diff --git a/docs/cpp/function-call-cpp.md b/docs/cpp/function-call-cpp.md index 804b63b3b5e..8c0cd68810a 100644 --- a/docs/cpp/function-call-cpp.md +++ b/docs/cpp/function-call-cpp.md @@ -17,7 +17,7 @@ primary-expression ( expression-list ) ## Remarks -In this context, `primary-expression` is the first operand, and `expression-list`, a possibly empty list of arguments, is the second operand. The function-call operator is used for operations that require a number of parameters. This works because `expression-list` is a list instead of a single operand. The function-call operator must be a nonstatic member function. +In this context, `primary-expression` is the first operand, and `expression-list`, a possibly empty list of arguments, is the second operand. The function-call operator is useful for operations that require a number of parameters. This usefulness comes from the fact that `expression-list` is a list instead of a single operand. Before C++23, the function-call operator had to be a nonstatic member function. In C++23 and later, it can be a static member function. For more information, see [Static function call operator](static-function-call-operator.md). The function-call operator, when overloaded, does not modify how functions are called; rather, it modifies how the operator is to be interpreted when applied to objects of a given class type. For example, the following code would usually be meaningless: @@ -73,4 +73,5 @@ int main() ## See also +[Static function call operator](static-function-call-operator.md)\ [Operator Overloading](../cpp/operator-overloading.md) diff --git a/docs/cpp/static-function-call-operator.md b/docs/cpp/static-function-call-operator.md new file mode 100644 index 00000000000..b1fbb12d625 --- /dev/null +++ b/docs/cpp/static-function-call-operator.md @@ -0,0 +1,88 @@ +--- +description: "Learn how to declare and use the static function call operator in C++." +title: "Static function call operator (C++)" +ms.date: 08/19/2026 +ai-usage: ai-assisted +helpviewer_keywords: ["static function call operator [C++]", "static operator() [C++]", "operator overloading [C++]"] +--- + +# Static function call operator (C++) + +In C++23, you can declare the function call operator (`operator()`) as a static member function. A static function call operator doesn't have an implicit object parameter. Use it when a callable type doesn't need to access instance data. + +Support for this feature was introduced in Visual Studio 2022 version 17.14 (MSVC 14.44). Use the `/std:c++latest` compiler option. + +## Syntax + +```cpp +static return-type operator()(parameter-list); +``` + +You can also declare the function call operator generated for a lambda expression as static: + +```cpp +[](parameter-list) static { function-body } +``` + +## Remarks + +A static function call operator doesn't have a `this` pointer. It can't be `virtual` or have a cv-qualifier (`const` or `volatile`) or ref-qualifier (`&`, `&&`). + +You can call a static function call operator by using an object of its class, which allows the object to work as a function object. You can also call it by using its qualified name. Taking its address produces a regular function pointer instead of a pointer-to-member function. + +A lambda expression can specify `static` after its parameter list. A static lambda can't have captures or be declared `mutable`. Declaring a captureless lambda doesn't make it static automatically; you must specify `static` to opt in to this behavior. + +The feature-test macro `__cpp_static_call_operator` is defined when the static function call operator is available. + +## Example + +The following example defines a stateless function object and calls its static function call operator in three ways: + +```cpp +// Compile with: /std:c++latest + +#include + +struct Multiply +{ + static constexpr int operator()(int left, int right) noexcept + { + return left * right; + } +}; + +int main() +{ + Multiply multiply; + + std::cout << "multiply(6, 7) = " << multiply(6, 7) << std::endl; + std::cout << "Multiply::operator()(3, 4) = " + << Multiply::operator()(3, 4) << std::endl; + + auto multiply_function = &Multiply::operator(); + std::cout << "multiply_function(5, 5) = " + << multiply_function(5, 5) << std::endl; + + auto twice = [](int value) static noexcept + { + return value * 2; + }; + + std::cout << "twice(21) = " << twice(21) << std::endl; +} +``` + +```output +multiply(6, 7) = 42 +Multiply::operator()(3, 4) = 12 +multiply_function(5, 5) = 25 +twice(21) = 42 +``` + +## See also + +[Function call](function-call-cpp.md)\ +[Function-call operator](function-call-operator-parens.md)\ +[Operator overloading](operator-overloading.md)\ +[`static` members](static-members-cpp.md)\ +[Proposal P1169R4: static `operator()`](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p1169r4.html) \ No newline at end of file diff --git a/docs/cpp/static-subscript-operator.md b/docs/cpp/static-subscript-operator.md new file mode 100644 index 00000000000..fd0498a3bf3 --- /dev/null +++ b/docs/cpp/static-subscript-operator.md @@ -0,0 +1,70 @@ +--- +description: "Learn how to declare and use the static subscript operator in C++." +title: "Static subscript operator (C++)" +ms.date: 08/19/2026 +ai-usage: ai-assisted +helpviewer_keywords: ["static subscript operator [C++]", "static operator[] [C++]", "operator overloading [C++]"] +--- + +# Static subscript operator (C++) + +In C++23, you can declare the subscript operator (`operator[]`) as a static member function. A static subscript operator doesn't have an implicit object parameter. Use it when a subscript operation doesn't need to access instance data. + +Support for this feature was introduced in Visual Studio 2022 version 17.14 (MSVC 14.44). Use the `/std:c++latest` compiler option. + +## Syntax + +```cpp +static return-type operator[](parameter-list); +``` + +## Remarks + +A static subscript operator doesn't have a `this` pointer. It can't be `virtual` or have a cv-qualifier (`const` or `volatile`) or ref-qualifier (`&`, `&&`). + +You can call a static subscript operator by using an object of its class, which allows the object to use subscript syntax. You can also call it by using its qualified name. Taking its address produces a regular function pointer instead of a pointer-to-member function. + +The feature-test macro `__cpp_static_call_operator` is defined when the static subscript operator is available. + +## Example + +The following example defines a stateless type that calculates powers of two and calls its static subscript operator in three ways: + +```cpp +// Compile with: /std:c++latest + +#include + +struct PowersOfTwo +{ + static constexpr unsigned int operator[](unsigned int exponent) noexcept + { + return 1U << exponent; + } +}; + +int main() +{ + PowersOfTwo powers_of_two; + + std::cout << "powers_of_two[6] = " << powers_of_two[6] << std::endl; + std::cout << "PowersOfTwo::operator[](4) = " + << PowersOfTwo::operator[](4) << std::endl; + + auto power_function = &PowersOfTwo::operator[]; + std::cout << "power_function(5) = " << power_function(5) << std::endl; +} +``` + +```output +powers_of_two[6] = 64 +PowersOfTwo::operator[](4) = 16 +power_function(5) = 32 +``` + +## See also + +[Subscripting](subscripting.md)\ +[Operator overloading](operator-overloading.md)\ +[`static` members](static-members-cpp.md)\ +[Proposal P2589R1: static `operator[]`](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2589r1.pdf) \ No newline at end of file diff --git a/docs/cpp/subscripting.md b/docs/cpp/subscripting.md index 62fc228c211..fca0cb6b2a8 100644 --- a/docs/cpp/subscripting.md +++ b/docs/cpp/subscripting.md @@ -7,7 +7,9 @@ ms.assetid: eb151281-6733-401d-9787-39ab6754c62c --- # Subscripting -The subscript operator (**[ ]**), like the function-call operator, is considered a binary operator. The subscript operator must be a nonstatic member function that takes a single argument. This argument can be of any type and designates the desired array subscript. +The subscript operator (**[ ]**), like the function-call operator, is a binary operator. Before C++23, the subscript operator must be a nonstatic member function. In C++23 and later, it can be a static member function. For more information, see [Static subscript operator](static-subscript-operator.md). + +The argument can be any type and designates the desired array subscript. ## Example @@ -86,4 +88,5 @@ Note that the function **operator[]** returns a reference type. This causes it t ## See also +[Static subscript operator](static-subscript-operator.md)\ [Operator Overloading](../cpp/operator-overloading.md) diff --git a/docs/cpp/toc.yml b/docs/cpp/toc.yml index 1f17ade4e51..111d9c465ec 100644 --- a/docs/cpp/toc.yml +++ b/docs/cpp/toc.yml @@ -336,8 +336,12 @@ items: href: ../cpp/assignment.md - name: Function call href: ../cpp/function-call-cpp.md + - name: Static function call operator + href: ../cpp/static-function-call-operator.md - name: Subscripting href: ../cpp/subscripting.md + - name: Static subscript operator + href: ../cpp/static-subscript-operator.md - name: Member access href: ../cpp/member-access.md - name: Classes and structs From cbcf77b30fb07a9f79af4b9a90d5ac438647f59e Mon Sep 17 00:00:00 2001 From: b-wkl <152566623+b-wkl@users.noreply.github.com> Date: Thu, 20 Aug 2026 15:54:39 -0700 Subject: [PATCH 19/20] Update SSE and AVX descriptions to x64 Change comment from Intel to x64 for /arch (x64) flag description consistency. --- docs/build/reference/arch-x64.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/build/reference/arch-x64.md b/docs/build/reference/arch-x64.md index da9e57733f8..435d925bc94 100644 --- a/docs/build/reference/arch-x64.md +++ b/docs/build/reference/arch-x64.md @@ -16,25 +16,25 @@ Specifies the architecture for code generation on x64. These switches apply to t ## Arguments **`/arch:SSE2`**\ -Enables Intel Streaming SIMD Extensions 2. The default instruction set is SSE2 if no **`/arch`** option is specified. +Enables x64 Streaming SIMD Extensions 2. The default instruction set is SSE2 if no **`/arch`** option is specified. **`/arch:SSE4.2`**\ -Enables Intel Streaming SIMD Extensions 4.2. +Enables x64 Streaming SIMD Extensions 4.2. **`/arch:AVX`**\ -Enables Intel Advanced Vector Extensions. +Enables x64 Advanced Vector Extensions. **`/arch:AVX2`**\ -Enables Intel Advanced Vector Extensions 2. +Enables x64 Advanced Vector Extensions 2. **`/arch:AVX512`**\ -Enables Intel Advanced Vector Extensions 512. +Enables x64 Advanced Vector Extensions 512. **`/arch:AVX10.1`**\ -Enables Intel Advanced Vector Extensions 10 version 1. +Enables x64 Advanced Vector Extensions 10 version 1. **`/arch:AVX10.2`**\ -Enables Intel Advanced Vector Extensions 10 version 2. +Enables x64 Advanced Vector Extensions 10 version 2. ## Remarks From 952d9e63e2b157456f1a9e8f7c184d0fc06fa212 Mon Sep 17 00:00:00 2001 From: Tyler Whitney Date: Thu, 20 Aug 2026 16:06:21 -0700 Subject: [PATCH 20/20] Apply suggestions from code review Co-authored-by: learn-build-service-prod-10[bot] <274431553+learn-build-service-prod-10[bot]@users.noreply.github.com> --- docs/build/reference/arch-x64.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/build/reference/arch-x64.md b/docs/build/reference/arch-x64.md index 435d925bc94..f75dd9acbee 100644 --- a/docs/build/reference/arch-x64.md +++ b/docs/build/reference/arch-x64.md @@ -16,7 +16,7 @@ Specifies the architecture for code generation on x64. These switches apply to t ## Arguments **`/arch:SSE2`**\ -Enables x64 Streaming SIMD Extensions 2. The default instruction set is SSE2 if no **`/arch`** option is specified. +Enables x64 Streaming SIMD Extensions 2. If you don't specify a **`/arch`** option, the default instruction set is SSE2. **`/arch:SSE4.2`**\ Enables x64 Streaming SIMD Extensions 4.2.