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

           Summary: Mangling of ArgClose for variadic function is swapped
           Product: D
           Version: D1 & D2
          Platform: All
               URL: http://digitalmars.com/d/2.0/abi.html
        OS/Version: All
            Status: NEW
          Keywords: spec
          Severity: trivial
          Priority: P2
         Component: websites
        AssignedTo: nob...@puremagic.com
        ReportedBy: kenn...@gmail.com


--- Comment #0 from kenn...@gmail.com 2011-05-09 02:08:28 PDT ---
The spec says:

ArgClose
    X     // variadic T t,...) style
    Y     // variadic T t...) style
    Z     // not variadic

But in reality:
------------------------------------
void ff(int x, ...) {}
void gg(int[] x ...) {}
void main() {
   assert( (&ff).mangleof == "PFiYv" );  // passes
   assert( (&gg).mangleof == "PFAiXv" ); // passes
}
------------------------------------

This shows X and Y are swapped. The fixed rule should be:

ArgClose
    X     // variadic T t...) style
    Y     // variadic T t,...) style
    Z     // not variadic

(The current core.demangle which follows this wrong ABI documentation generates
the wrong output.)

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

Reply via email to