Source

gdc / gdc.test / compilable / callconv.d

Full commit
Daniel Green b6fdbee 









































































// PERMUTE_ARGS:

import core.stdc.stdarg;

struct ABC
{
	int x[4];
}

ABC abc;

int x,y,z;

extern (Pascal):
ABC test1(int xx, int yy, int zz)
{
    x = xx;
    y = yy;
    z = zz;
    return abc;
}

extern (Pascal):
ABC test1v(int xx, int yy, int zz, ...)
{
    x = xx;
    y = yy;
    z = zz;
    return abc;
}

extern (C):
ABC test2v(int xx, int yy, int zz, ...)
{
    x = xx;
    y = yy;
    z = zz;
    return abc;
}

extern (C++):
ABC test3(int xx, int yy, int zz)
{
    x = xx;
    y = yy;
    z = zz;
    return abc;
}

ABC test3v(int xx, int yy, int zz, ...)
{
    x = xx;
    y = yy;
    z = zz;
    return abc;
}

extern (D):
ABC test4(int xx, int yy, int zz)
{
    x = xx;
    y = yy;
    z = zz;
    return abc;
}

ABC test4v(int xx, int yy, int zz, ...)
{
    x = xx;
    y = yy;
    z = zz;
    return abc;
}