www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 5967] New: Mangling of ArgClose for variadic function is swapped

reply d-bugmail puremagic.com writes:
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: nobody puremagic.com
        ReportedBy: kennytm gmail.com



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: -------
May 09 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5967




Doc fix:

https://github.com/D-Programming-Language/d-programming-language.org/pull/17

Druntime is still _not_ fixed as
https://github.com/D-Programming-Language/druntime/commit/a9e774dde6fe55d43d72f5206e04d462b51b0ebd
has be reverted.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 19 2011
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5967


klickverbot <code klickverbot.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |code klickverbot.at
         Resolution|                            |FIXED



---
https://github.com/D-Programming-Language/druntime/commit/35c79fe8ac6483fdcf91960d3f5681489525ca59

and for the unit tests:

https://github.com/D-Programming-Language/druntime/pull/53

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