On 2012-07-10 09:57, Andrea Fontana wrote:

struct test
{
int var;
};

struct test* first();

Dstep translate first() => first(...) in this case.

As far as I know that is legal C code is a variadic function. It's the old K&R style which is discouraged now but still legal:

http://en.wikipedia.org/wiki/ANSI_C#Compliance_detectability

If you want a function taking no arguments the correct syntax is:

struct test* first (void);

I don't know the best way to deal with that. It's legal C code but not legal D. I could check if there is no parameters and assume that's what the users wants but it's not correct. Perhaps I could provide a flag for this.

--
/Jacob Carlborg

Reply via email to