Skip to content
Prev Previous commit
Strengthen wording on "C" ABI
When using the "C" ABI, do we "match" the default ABI chosen by the dominant C compiler for the target or do we "attempt" to match it? Tough question. There are believed to be some exceptions in current behavior. However, in the Reference, we generally state things in terms of what the consensus is on how they should be and then note the bugs, so let's do that here. We'll just say that we "match" it.
  • Loading branch information
traviscross committed Oct 8, 2025
commit cc463db8aa2b19cef0a040da37e41634a3b1148f
2 changes: 1 addition & 1 deletion src/items/external-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ r[items.extern.abi.rust]
* `unsafe extern "Rust"` --- The native calling convention for Rust functions and closures. This is the default when a function is declared without using [`extern fn`]. The Rust ABI offers no stability guarantees.

r[items.extern.abi.c]
* `unsafe extern "C"` --- The "C" ABI attempts to match the default ABI chosen by the dominant C compiler for the target.
* `unsafe extern "C"` --- The "C" ABI matches the default ABI chosen by the dominant C compiler for the target.

r[items.extern.abi.system]
* `unsafe extern "system"` --- This is equivalent to `extern "C"` except on Windows x86_32 where it is equivalent to `"stdcall"`.
Expand Down