From: cuz Date: Sun, 9 Jan 2005 21:16:32 +0000 (+0000) Subject: Don't treat K&R functions as variadic. The standard (at least the C99 one) X-Git-Tag: V2.12.0~473 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6a1ff584997ddfa720faf7dc500b6db870c4042a;p=cc65 Don't treat K&R functions as variadic. The standard (at least the C99 one) says that passing an invalid number of parameters causes undefined behaviour, so we don't need to handle that case. git-svn-id: svn://svn.cc65.org/cc65/trunk@3363 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/cc65/declare.c b/src/cc65/declare.c index 1ba1ace6c..8da401278 100644 --- a/src/cc65/declare.c +++ b/src/cc65/declare.c @@ -834,8 +834,8 @@ static FuncDesc* ParseFuncDecl (const DeclSpec* Spec) */ Sym = FindSym (CurTok.Ident); if (Sym == 0 || !SymIsTypeDef (Sym)) { - /* Old style (K&R) function. Assume variable param list. */ - F->Flags |= (FD_OLDSTYLE | FD_VARIADIC); + /* Old style (K&R) function. */ + F->Flags |= FD_OLDSTYLE; } }