windows 64bit variadic functions

Benjamin Thaut code at benjamin-thaut.de
Sat Feb 9 12:20:22 PST 2013


I have this small test program, it will crash when compiled on x64 
windows, but it works fine on 32bit windows. What am I doing wrong?

import core.vararg;
import std.stdio;

void print(string fmt, ...)
{
   auto arg = va_arg!(const(char)[])(_argptr);
   writefln(fmt ~ arg);
}

void main(string[] args)
{
   print("+++","---");
}

Kind Regards
Benjamin Thaut


More information about the Digitalmars-d-learn mailing list