Skip to content

Commit b6a7cfb

Browse files
committed
update for more ABIs supporting c-variadics
1 parent 2d9827f commit b6a7cfb

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

src/items/external-blocks.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,18 @@ unsafe extern "C" {
187187
> [!WARNING]
188188
> The `safe` qualifier should not be used on a function in an `extern` block unless that function guarantees that it will not access the variadic arguments at all. Passing an unexpected number of arguments or arguments of unexpected type to a variadic function may lead to [undefined behavior][undefined].
189189
190+
r[items.extern.variadic.conventions]
191+
Variadic parameters can only be specified with [`extern`] blocks with the following ABI strings:
192+
- `"aapcs"`
193+
- `"C"`
194+
- `"cdecl"`
195+
- `"efiapi"`
196+
- `"system"`
197+
- `"sysv64"`
198+
- `"win64"`
199+
200+
This also includes the corresponding [`-unwind` variants][items.fn.extern.unwind].
201+
190202
r[items.extern.attributes]
191203
## Attributes on extern blocks
192204

src/types/function-pointer.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,7 @@ function], and the `extern` qualifier indicates it is an [extern function].
5151

5252
r[type.fn-pointer.constraint-variadic]
5353
Variadic parameters can only be specified with [`extern`] function types with
54-
the `"C"` or `"cdecl"` calling convention.
55-
56-
This also includes the corresponding [`-unwind` variants][items.fn.extern.unwind].
54+
supported calling conventions, as defined [here][items.extern.variadic.conventions].
5755

5856
r[type.fn-pointer.attributes]
5957
## Attributes on function pointer parameters

0 commit comments

Comments
 (0)