From 469225d8467fa26d92e1a66ab82e1f7963e3a7cc Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Sat, 11 Feb 1995 15:09:00 -0800 Subject: [PATCH] (expand_call): When setting n_named_args, depend on new macro STRICT_ARGUMENT_NAMING. From-SVN: r8911 --- gcc/calls.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/gcc/calls.c b/gcc/calls.c index 0a6b029..1b5466b 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -932,23 +932,29 @@ expand_call (exp, target, ignore) /* Compute number of named args. Normally, don't include the last named arg if anonymous args follow. - (If no anonymous args follow, the result of list_length - is actually one too large.) + We do include the last named arg if STRICT_ARGUMENT_NAMING is defined. + (If no anonymous args follow, the result of list_length is actually + one too large. This is harmless.) - If SETUP_INCOMING_VARARGS is defined, this machine will be able to - place unnamed args that were passed in registers into the stack. So - treat all args as named. This allows the insns emitting for a specific - argument list to be independent of the function declaration. + If SETUP_INCOMING_VARARGS is defined and STRICT_ARGUMENT_NAMING is not, + this machine will be able to place unnamed args that were passed in + registers into the stack. So treat all args as named. This allows the + insns emitting for a specific argument list to be independent of the + function declaration. If SETUP_INCOMING_VARARGS is not defined, we do not have any reliable way to pass unnamed args in registers, so we must force them into memory. */ -#ifndef SETUP_INCOMING_VARARGS +#if !defined(SETUP_INCOMING_VARARGS) || defined(STRICT_ARGUMENT_NAMING) if (TYPE_ARG_TYPES (funtype) != 0) n_named_args - = list_length (TYPE_ARG_TYPES (funtype)) - 1 + = list_length (TYPE_ARG_TYPES (funtype)) +#ifndef STRICT_ARGUMENT_NAMING + /* Don't include the last named arg. */ + - 1 +#endif /* Count the struct value address, if it is passed as a parm. */ - + structure_value_addr_parm; + + structure_value_addr_parm); else #endif /* If we know nothing, treat all args as named. */ -- 2.7.4