[Issue 1731] New: forward reference of function type alias resets calling convention

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Dec 14 17:28:46 PST 2007


http://d.puremagic.com/issues/show_bug.cgi?id=1731

           Summary: forward reference of function type alias resets calling
                    convention
           Product: D
           Version: 1.024
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: thecybershadow at gmail.com


// == minimal testcase start ==
alias uint DWORD;
MY_API_FUNCTION lpStartAddress;  // <-- comment this line to remove error
extern (Windows) alias DWORD function(void*) MY_API_FUNCTION;
static assert(MY_API_FUNCTION.stringof == "uint(Windows *)(void*)");
// == minimal testcase end ==

The actual calling convention (MY_API_FUNCTION.stringof) is "uint(*)(void*)".
This is from a real-life case (the Windows header project).


-- 



More information about the Digitalmars-d-bugs mailing list