diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1995-02-11 15:09:00 -0800 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1995-02-11 15:09:00 -0800 |
commit | 469225d8467fa26d92e1a66ab82e1f7963e3a7cc (patch) | |
tree | bef4801861b553c5f475d6104558a7b3d29398a3 /gcc | |
parent | ecacce3776083c912a790422c7f54b91deecd7dc (diff) | |
download | gcc-469225d8467fa26d92e1a66ab82e1f7963e3a7cc.zip gcc-469225d8467fa26d92e1a66ab82e1f7963e3a7cc.tar.gz gcc-469225d8467fa26d92e1a66ab82e1f7963e3a7cc.tar.bz2 |
(expand_call): When setting n_named_args, depend on new
macro STRICT_ARGUMENT_NAMING.
From-SVN: r8911
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/calls.c | 24 |
1 files 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. */ |