[Issue 1543] Incorrect passing of floats to variadic functions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Oct 13 00:40:23 PDT 2007


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





------- Comment #2 from afb at algonet.se  2007-10-13 02:40 -------

Seems to be working here, if you avoid the unportable casts...

import std.stdio;
import std.stdarg;

void foo(...)
{   
        writefln(va_arg!(float)(_argptr));
}

void foo_d( ...)
{   
        writefln(va_arg!(double)(_argptr));
}

void main()
{
        foo(10.1f);
        foo_d(10.1);
}


-- 



More information about the D.gnu mailing list