Bug 1805 – GDC does not implement the D calling convention

Status
RESOLVED
Resolution
WONTFIX
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
All
Creation time
2008-01-25T03:04:00Z
Last change time
2015-06-09T05:15:05Z
Keywords
wrong-code
Assigned to
ibuclaw
Creator
larsivar
Blocks
670, 1230

Comments

Comment #0 by larsivar — 2008-01-25T03:04:17Z
From the GDC homepage: " Known Differences from DMD: ... Currently, GDC uses the C calling convention for all functions except those declared extern (Windows). " Considering that the spec doesn't mandate this to be an implementation specific detail, this is a bug, which in addition cause several issues.
Comment #1 by clugdbug — 2008-06-30T07:49:46Z
Additionally: I don't think it should have D_InlineAsm set as long as it is ignoring the ABI like this. (It should probably set GDC_InlineAsm_X86 instead).
Comment #2 by ibuclaw — 2012-03-12T08:27:23Z
After some discussion a while ago, GCC core devs are not too keen on adding yet another calling convention to i386 on top of what's already supported - that makes this report a wontfix.
Comment #3 by ibuclaw — 2012-07-06T05:12:42Z
From the D spec: """ The extern (C) and extern (D) calling convention matches the C calling convention used by the supported C compiler on the host system. Except that the extern (D) calling convention for Windows x86 is described here. """ So GDC is compliant with the spec across all platforms except Windows (which uses stdcall rather than the D calling convention as used by DMD). D_InlineAsm is no longer set by GDC. This avoids any issues to do with library devs writing assembly which assumes the calling convention matches whatever the DMD compiler does. Marking as wontfix.