summaryrefslogtreecommitdiff
path: root/gcc/c-aux-info.c
diff options
context:
space:
mode:
authorfroydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4>2010-08-09 14:07:58 +0000
committerfroydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4>2010-08-09 14:07:58 +0000
commit257d99c3322b212eaf262e0078549956d90c2141 (patch)
treec8260d9815d8d4bc233f5955b7299662d6909600 /gcc/c-aux-info.c
parent6ecedef2bdd76b389fed2fdac0951277bb6b4acd (diff)
downloadgcc-257d99c3322b212eaf262e0078549956d90c2141.tar.gz
gcc/
* builtins.c (fold_builtin_next_arg): Use stdarg_p. * config/arm/arm.c (arm_get_pcs_model): Likewise. * config/avr/avr.c (init_cumulative_args): Likewise. * config/iq2000/iq2000.c (iq2000_expand_prologue): Likewise. * config/lm32/lm32.c (lm32_setup_incoming_varargs): Likewise. * config/m68k/m68k.c (m68k_return_pops_args): Likewise. * config/mn10300/mn10300.c (mn10300_builtin_saveregs): Likewise. * config/pa/pa.c (hppa_builtin_saveregs): Likewise. * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Likewise. * config/rs6000/rs6000.c (init_cumulative_args): Likewise. * dwarf2out.c (gen_subprogram_die): Likewise. * function.c (allocate_struct_function): Likewise. * c-aux-info.c (gen_formal_list_for_func_dec): Likewise. (deserves_ellipsis): Delete. gcc/cp/ * tree.c (varargs_function_p): Use stdarg_p. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163033 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-aux-info.c')
-rw-r--r--gcc/c-aux-info.c25
1 files changed, 1 insertions, 24 deletions
diff --git a/gcc/c-aux-info.c b/gcc/c-aux-info.c
index 28da8e0e441..8ec6a13da10 100644
--- a/gcc/c-aux-info.c
+++ b/gcc/c-aux-info.c
@@ -42,7 +42,6 @@ static const char *data_type;
static char *affix_data_type (const char *) ATTRIBUTE_MALLOC;
static const char *gen_formal_list_for_type (tree, formals_style);
-static int deserves_ellipsis (tree);
static const char *gen_formal_list_for_func_def (tree, formals_style);
static const char *gen_type (const char *, tree, formals_style);
static const char *gen_decl (tree, int, formals_style);
@@ -183,28 +182,6 @@ gen_formal_list_for_type (tree fntype, formals_style style)
return concat (" (", formal_list, ")", NULL);
}
-/* For the generation of an ANSI prototype for a function definition, we have
- to look at the formal parameter list of the function's own "type" to
- determine if the function's formal parameter list should end with an
- ellipsis. Given a tree node, the following function will return nonzero
- if the "function type" parameter list should end with an ellipsis. */
-
-static int
-deserves_ellipsis (tree fntype)
-{
- tree formal_type;
-
- formal_type = TYPE_ARG_TYPES (fntype);
- while (formal_type && TREE_VALUE (formal_type) != void_type_node)
- formal_type = TREE_CHAIN (formal_type);
-
- /* If there were at least some parameters, and if the formals-types-list
- petered out to a NULL (i.e. without being terminated by a void_type_node)
- then we need to tack on an ellipsis. */
-
- return (!formal_type && TYPE_ARG_TYPES (fntype));
-}
-
/* Generate a parameter list for a function definition (in some given style).
Note that this routine has to be separate (and different) from the code that
@@ -248,7 +225,7 @@ gen_formal_list_for_func_def (tree fndecl, formals_style style)
{
if (!DECL_ARGUMENTS (fndecl))
formal_list = concat (formal_list, "void", NULL);
- if (deserves_ellipsis (TREE_TYPE (fndecl)))
+ if (stdarg_p (TREE_TYPE (fndecl)))
formal_list = concat (formal_list, ", ...", NULL);
}
if ((style == ansi) || (style == k_and_r_names))