view test/vararg3.d @ 237:a168a2c3ea48 trunk

[svn r253] Removed -inlineasm option. inline asm is now enabled by default unless the new -noasm option is passed. Tried adding a stack trace print when compiler crashes, not sure it's working though. Changed data layouts to match that of llvm-gcc. Fixed casting function pointers. Added support checks in AsmStatement.
author lindquist
date Sun, 08 Jun 2008 19:09:24 +0200
parents a9d29e9f1fed
children d9d5d59873d8
line wrap: on
line source

module vararg3;

import std.stdarg;

void func(...)
{
    assert(_arguments.length == 3);
    assert(_arguments[0] is typeid(int));
    assert(_arguments[1] is typeid(float));
    assert(_arguments[2] is typeid(long));
    assert(va_arg!(int)(_argptr) == 4);
    assert(va_arg!(float)(_argptr) == 2.5f);
    assert(va_arg!(long)(_argptr) == 42L);
}

void main()
{
    func(4, 2.5f, 42L);
}