You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: proposals/0495-cdecl.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -169,7 +169,9 @@ Existing adopters of `@_cdecl` can replace the attribute with `@objc` to preserv
169
169
170
170
## ABI compatibility
171
171
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.
173
175
174
176
Adding or removing the `@c` attribute on an enum is ABI stable, but changing its raw type is not.
0 commit comments