Skip to content

Commit 0e14aa5

Browse files
committed
SE-0495: Clarify the symbols emitted and ABI compatibility
1 parent 2479269 commit 0e14aa5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

proposals/0495-cdecl.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,9 @@ Existing adopters of `@_cdecl` can replace the attribute with `@objc` to preserv
169169

170170
## ABI compatibility
171171

172-
Marking a global function with `@c` or `@objc` makes it use the C calling convention. Adding or removing these attributes on a function is an ABI breaking change. Updating existing `@_cdecl` to `@objc` or `@c` is ABI stable.
172+
The compiler emits a single symbol for `@c` and `@objc` functions, the symbol uses the C calling convention.
173+
174+
Adding or removing the attributes `@c` and `@objc` on a function is an ABI breaking change. Changing between `@c` and `@objc` is ABI stable. Changing between `@_cdecl` and either `@c` or `@objc` is an ABI breaking change since `@_cdecl` emits two symbols and Swift clients of `@_cdecl` call the one with the Swift calling convention.
173175

174176
Adding or removing the `@c` attribute on an enum is ABI stable, but changing its raw type is not.
175177

0 commit comments

Comments
 (0)