www.digitalmars.com         C & C++   DMDScript  

D.gnu - [Issue 1805] New: GDC does not implement the D calling convention

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1805

           Summary: GDC does not implement the D calling convention
           Product: DGCC aka GDC
           Version: 0.24
          Platform: Other
        OS/Version: All
            Status: NEW
          Keywords: wrong-code
          Severity: major
          Priority: P2
         Component: glue layer
        AssignedTo: dvdfrdmn users.sf.net
        ReportedBy: larsivar igesund.net
OtherBugsDependingO 670,1230
             nThis:


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.


-- 
Jan 25 2008
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1805






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).


-- 
Jun 30 2008
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1805




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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 12 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1805


Iain Buclaw <ibuclaw ubuntu.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX



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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 06 2012