Skip to content

Commit 5d90855

Browse files
folkertdevehuss
authored andcommitted
specify that extern c-variadic functions cannot be safe
1 parent 056d4e6 commit 5d90855

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/items/external-blocks.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@ unsafe extern "C" {
182182
}
183183
```
184184

185+
r[items.extern.variadic.safety]
186+
A variadic extern function cannot be qualified as `safe`. Passing an unexpected number of arguments or arguments of an unexpected type to a variadic function is [undefined behavior][undefined].
187+
185188
r[items.extern.attributes]
186189
## Attributes on extern blocks
187190

0 commit comments

Comments
 (0)