Summary: Mangling of ArgClose for variadic function is swapped
           Product: D
           Version: D1 & D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: spec
          Severity: trivial
          Priority: P2
         Component: websites

--- Comment #0 from 2011-05-09 02:08:28 PDT ---
The spec says:

    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:

    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:
------- You are receiving this mail because: -------

Reply via email to