-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Tracking issue for unsupported_calling_conventions (cdecl, stdcall, fastcall) #137018
Copy link
Copy link
Open
Labels
A-ABIArea: Concerning the application binary interface (ABI)Area: Concerning the application binary interface (ABI)C-bugCategory: This is a bug.Category: This is a bug.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCI-lang-radarItems that are on lang's radar and will need eventual work or consideration.Items that are on lang's radar and will need eventual work or consideration.O-windowsOperating system: WindowsOperating system: WindowsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language team
Metadata
Metadata
Assignees
Labels
A-ABIArea: Concerning the application binary interface (ABI)Area: Concerning the application binary interface (ABI)C-bugCategory: This is a bug.Category: This is a bug.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCI-lang-radarItems that are on lang's radar and will need eventual work or consideration.Items that are on lang's radar and will need eventual work or consideration.O-windowsOperating system: WindowsOperating system: WindowsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language team
Type
Fields
Give feedbackNo fields configured for issues without a type.
View all comments
This is a tracking issue for the
unsupported_calling_conventionslint. This lint warns againstextern "cdecl"on non-x86-32 targets. Useextern "C"instead, there is no difference in behavior.extern "stdcall"orextern "fastcall"on non-x86-32 Windows targets. These ABIs are only defined for x86-32.extern "system".fn_abicrate. Also we'd be interested to hear about your use-case, so please leave a comment below.Implementation history:
unsupported_calling_conventionslint to reject more invalid calling conventions #141435Timeline:
Original issue description
We generally accept
stdcallon non-x86-32 Windows targets (while rejecting it on other non-x86-32 targets). See the discussion about this at #86231 (comment) and #86231 (comment). However, @ChrisDenton points out that theraw-dylibfeature is more strict here. That's an inconsistency that we should probably fix?@ChrisDenton can you give an example of what exactly is being rejected by raw-dylib here?
2025-05-05: See here for the current latest proposal.
Cc @workingjubilee @rust-lang/lang @nagisa @petrochenkov