mirror of
https://github.com/cc65/cc65.git
synced 2025-01-10 19:29:45 +00:00
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
This commit is contained in:
parent
9a6a7bdd24
commit
6a1ff58499
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user