mirror of
https://github.com/cc65/cc65.git
synced 2024-10-01 15:54:59 +00:00
In a function call for all parameters not covered by a prototype, convert
arrays to pointer to first element, and functions to pointer to function. git-svn-id: svn://svn.cc65.org/cc65/trunk@3169 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
dd9ee0ae37
commit
123677c802
@ -424,12 +424,21 @@ static unsigned FunctionParamList (FuncDesc* Func)
|
|||||||
*/
|
*/
|
||||||
Flags = CF_NONE;
|
Flags = CF_NONE;
|
||||||
if (!Ellipsis) {
|
if (!Ellipsis) {
|
||||||
|
|
||||||
/* Convert the argument to the parameter type if needed */
|
/* Convert the argument to the parameter type if needed */
|
||||||
TypeConversion (&Expr, Param->Type);
|
TypeConversion (&Expr, Param->Type);
|
||||||
|
|
||||||
/* If we have a prototype, chars may be pushed as chars */
|
/* If we have a prototype, chars may be pushed as chars */
|
||||||
Flags |= CF_FORCECHAR;
|
Flags |= CF_FORCECHAR;
|
||||||
}
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
/* No prototype available. Convert array to "pointer to first
|
||||||
|
* element", and function to "pointer to function".
|
||||||
|
*/
|
||||||
|
Param->Type = PtrConversion (Param->Type)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/* Load the value into the primary if it is not already there */
|
/* Load the value into the primary if it is not already there */
|
||||||
LoadExpr (Flags, &Expr);
|
LoadExpr (Flags, &Expr);
|
||||||
|
Loading…
Reference in New Issue
Block a user