[Issue 6620] New: argument evaluation order inversed for extern(C)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Sep 7 16:05:24 PDT 2011


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

           Summary: argument evaluation order inversed for extern(C)
           Product: D
           Version: D2
          Platform: Other
        OS/Version: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: dawg at dawgfoto.de


--- Comment #0 from dawg at dawgfoto.de 2011-09-07 16:05:10 PDT ---
version (none)
{
    extern(C) int bar(int a, int b) { return b - a; }
}
else
{
    int bar(int a, int b) { return b - a; }
}

void main()
{
    int i;
    assert(bar(++i, ++i) == 1);
}

---

I know argument evaluation order isn't really guaranteed to be left to right.
But having a reverse order for extern(C) calls is simply surprising.

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


More information about the Digitalmars-d-bugs mailing list