Check for implicit int return in all cases
git-svn-id: svn://svn.cc65.org/cc65/trunk@1851 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
82a0184c26
commit
9222de75da
1 changed files with 16 additions and 16 deletions
|
@ -753,16 +753,16 @@ static FuncDesc* ParseFuncDecl (const DeclSpec* Spec)
|
|||
if (Sym == 0 || !SymIsTypeDef (Sym)) {
|
||||
/* Old style (K&R) function. Assume variable param list. */
|
||||
F->Flags |= (FD_OLDSTYLE | FD_VARIADIC);
|
||||
}
|
||||
}
|
||||
|
||||
/* Check for an implicit int return in the K&R function */
|
||||
/* Check for an implicit int return in the function */
|
||||
if ((Spec->Flags & DS_DEF_TYPE) != 0 &&
|
||||
Spec->Type[0] == T_INT &&
|
||||
Spec->Type[1] == T_END) {
|
||||
/* Function has an implicit int return */
|
||||
F->Flags |= FD_OLDSTYLE_INTRET;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Parse params */
|
||||
if ((F->Flags & FD_OLDSTYLE) == 0) {
|
||||
|
|
Loading…
Add table
Reference in a new issue