Thread overview
[Issue 5698] va_arg sets wrong length for (u)short[]
Jan 25, 2015
AndyC
January 25, 2015
https://issues.dlang.org/show_bug.cgi?id=5698

AndyC <andy@squeakycode.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andy@squeakycode.net

--- Comment #3 from AndyC <andy@squeakycode.net> ---
The example code (after changing tango.stdc.stdarg to core.stdc.stdarg) doesnt
compile anymore  (DMD v2.066.1)

I'd guess there are newer/better ways to handle this, so I'd recommend closing it.


I get:
/usr/include/dmd/druntime/import/core/stdc/stdarg.d(67): Error: cannot
implicitly convert expression (cast(void*)(cast(uint)p + (tsize + 4u - 1u &
4294967292u))) of type void* to char*
main.d(15): Error: template instance core.stdc.stdarg.va_arg!() error
instantiating
main.d(57):        instantiated from here: varar_!ubyte

--
January 26, 2015
https://issues.dlang.org/show_bug.cgi?id=5698

Steven Schveighoffer <schveiguy@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |schveiguy@yahoo.com
         Resolution|---                         |FIXED

--- Comment #4 from Steven Schveighoffer <schveiguy@yahoo.com> ---
I downloaded attachment, changed tango to core in both cases, compiles and runs with 2.066.1, and outputs:

vararg_:
ubyte[].length = 3
ushort[].length = 3
short[].length = 3
uint[].length = 3
vararg:
ubyte[].length = 3
ushort[].length = 3
short[].length = 3
uint[].length = 3

On Macos X (64-bit).

--
June 10, 2015
https://issues.dlang.org/show_bug.cgi?id=5698

Andrei Alexandrescu <andrei@erdani.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|unspecified                 |D2

--