Skip to content

Commit

Permalink
C-style variadic functions with C++ linkage use the C calling convent…
Browse files Browse the repository at this point in the history
…ion.
  • Loading branch information
yebblies committed Jun 17, 2013
1 parent 2aaa85e commit bfdb9f3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/tocsym.c
Expand Up @@ -412,7 +412,12 @@ Symbol *FuncDeclaration::toSymbol()
case LINKcpp:
{ t->Tmangle = mTYman_cpp;
if (isThis() && !global.params.is64bit && global.params.isWindows)
t->Tty = TYmfunc;
{
if (((TypeFunction *)type)->varargs == 1)
t->Tty = TYnfunc;
else
t->Tty = TYmfunc;
}
s->Sflags |= SFLpublic;
Dsymbol *parent = toParent();
ClassDeclaration *cd = parent->isClassDeclaration();
Expand Down

0 comments on commit bfdb9f3

Please sign in to comment.