Skip to content

Commit 1ba64f4

Browse files
committed
specify that extern c-variadic functions cannot be safe
1 parent 056d4e6 commit 1ba64f4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/items/external-blocks.md

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

185+
r[items.extern.variadic.safety]
186+
187+
A variadic extern function cannot be qualified as `safe`.
188+
Passing an unexpected number of arguments or arguments of an unexpected type to a variadic function is UB.
189+
185190
r[items.extern.attributes]
186191
## Attributes on extern blocks
187192

0 commit comments

Comments
 (0)