Skip to content

Commit eb5fd54

Browse files
committed
Add __preserve_none to more file locations
1 parent b020f17 commit eb5fd54

5 files changed

Lines changed: 7 additions & 2 deletions

File tree

‎docs/build/reference/decorated-names.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ The form of decoration for a C function depends on the calling convention used i
5757
| **`__stdcall`** | Leading underscore (**`_`**) and a trailing at sign (**`@`**) followed by the number of bytes in the parameter list in decimal |
5858
| **`__fastcall`** | Leading and trailing at signs (**`@`**) followed by a decimal number representing the number of bytes in the parameter list |
5959
| **`__vectorcall`** | Two trailing at signs (**`@@`**) followed by a decimal number of bytes in the parameter list |
60+
| **`__preserve_none`** | Two trailing at signs, an underscore and the 'A' character (**`@@_A`**) |
6061

6162
For ARM64EC functions with C linkage (whether compiled as C or by using `extern "C"`), a **`#`** is prepended to the decorated name.
6263

‎docs/c-language/summary-of-declarations.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ ms.assetid: 53a5e9e5-1a33-40b5-9dea-7f669b479329
2121
&emsp;*`attribute`*<sup>1</sup> *`attribute-seq`*<sub>opt</sub><sup>1</sup>
2222

2323
*`attribute`*<sup>1, 2</sup>: one of\
24-
&emsp;**`__asm`** **`__based`** **`__cdecl`** **`__clrcall`** **`__fastcall`** **`__inline`** **`__stdcall`** **`__thiscall`** **`__vectorcall`**
24+
&emsp;**`__asm`** **`__based`** **`__cdecl`** **`__clrcall`** **`__fastcall`** **`__inline`** **`__stdcall`** **`__thiscall`** **`__vectorcall`** **`__preserve_none`**
2525

2626
*`init-declarator-list`*:\
2727
&emsp;*`init-declarator`*\
@@ -209,7 +209,7 @@ ms.assetid: 53a5e9e5-1a33-40b5-9dea-7f669b479329
209209
&emsp;**`_Static_assert`** **`(`** *`constant-expression`* **`,`** *`string-literal`* **`)`** **`;`**
210210

211211
<sup>1</sup> This grammar element is Microsoft-specific.\
212-
<sup>2</sup> For more information about these elements, see [`__asm`](../assembler/inline/asm.md), [`__clrcall`](../cpp/clrcall.md), [`__stdcall`](../cpp/stdcall.md), [`__based`](../cpp/based-grammar.md), [`__fastcall`](../cpp/fastcall.md), [`__thiscall`](../cpp/thiscall.md), [`__cdecl`](../cpp/cdecl.md), [`__inline`](../cpp/inline-functions-cpp.md), and [`__vectorcall`](../cpp/vectorcall.md).\
212+
<sup>2</sup> For more information about these elements, see [`__asm`](../assembler/inline/asm.md), [`__clrcall`](../cpp/clrcall.md), [`__stdcall`](../cpp/stdcall.md), [`__based`](../cpp/based-grammar.md), [`__fastcall`](../cpp/fastcall.md), [`__thiscall`](../cpp/thiscall.md), [`__cdecl`](../cpp/cdecl.md), [`__inline`](../cpp/inline-functions-cpp.md), [`__preserve_none`](../cpp/preservenone.md) and [`__vectorcall`](../cpp/vectorcall.md).\
213213
<sup>3</sup> This style is obsolete.
214214

215215
## See also

‎docs/cpp/toc.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,8 @@ items:
644644
href: ../cpp/thiscall.md
645645
- name: __vectorcall
646646
href: ../cpp/vectorcall.md
647+
- name: __preserve_none
648+
href: ../cpp/preserve-none.md
647649
- name: "Calling example: Function prototype and call"
648650
items:
649651
- name: "Calling example: Function prototype and call"

‎docs/error-messages/compiler-errors-2/compiler-errors-c7500-through-c7999.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ The articles in this section of the documentation explain a subset of the error
241241
| Compiler error C7740 | cannot jump to case label |
242242
| Compiler error C7741 | ABI inconsistency: '*function*' was originally assumed to use '`C`' return semantics but now it requires '`C++`' return semantics |
243243
| [Compiler error C7742](compiler-error-c7742.md) | '*identifier*': a forward declaration of an enum can only use a simple identifier |
244+
| Compiler error C7743 | `__preserve_none` calling convention is not supported |
244245
| Compiler error C7800 | duplicate explicit instantiation definition of '*name*' |
245246
| Compiler error C7801 | '*function*': if one declaration of '*identifier*' has the '`[[msvc::disptach]]`' attribute then all functions must have the attribute |
246247
| Compiler error C7802 | '*identifier*': a capability must resolve to an enumerator |

‎docs/error-messages/tool-errors/name-decoration.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ The following table shows the linker name for various calling conventions.
1919
|Fast call naming convention (**`__fastcall`**)|`@test@0`|`?test@@YIXXZ`|
2020
|Standard call naming convention (**`__stdcall`**)|`_test@0`|`?test@@YGXXZ`|
2121
|Vector call naming convention (**`__vectorcall`**)|`test@@0`|`?test@@YQXXZ`|
22+
|Preserve None naming convention (**`__preserve_none`**)|`test@@_A`|`NA`|
2223

2324
Use `extern "C"` to call a C function from C++. `extern "C"` forces use of the C naming convention for non-class C++ functions. Be aware of compiler switches **/Tc** or **/Tp**, which tell the compiler to ignore the filename extension and compile the file as C or C++, respectively. These options may cause linker names you don't expect.
2425

0 commit comments

Comments
 (0)