diff --git a/gen/functions.cpp b/gen/functions.cpp index eaa4e25a..9684fbc5 100644 --- a/gen/functions.cpp +++ b/gen/functions.cpp @@ -117,6 +117,12 @@ const llvm::FunctionType* DtoFunctionType(Type* type, Type* thistype, Type* nest lidx++; } } +#if DMDV2 + else + { + fty.c_vararg = true; + } +#else else if (f->linkage == LINKc) { fty.c_vararg = true; @@ -126,6 +132,7 @@ const llvm::FunctionType* DtoFunctionType(Type* type, Type* thistype, Type* nest type->error(0, "invalid linkage for variadic function"); fatal(); } +#endif } // if this _Dmain() doesn't have an argument, we force it to have one