static const char *data_type;
-static char *affix_data_type PARAMS ((const char *));
+static char *affix_data_type PARAMS ((const char *)) ATTRIBUTE_MALLOC;
static const char *gen_formal_list_for_type PARAMS ((tree, formals_style));
static int deserves_ellipsis PARAMS ((tree));
static const char *gen_formal_list_for_func_def PARAMS ((tree, formals_style));
affix_data_type (param)
const char *param;
{
- char *type_or_decl = (char *) alloca (strlen (param) + 1);
+ char *const type_or_decl = ASTRDUP (param);
char *p = type_or_decl;
char *qualifiers_then_data_type;
char saved;
- strcpy (type_or_decl, param);
-
/* Skip as many leading const's or volatile's as there are. */
for (;;)
*p = '\0';
qualifiers_then_data_type = concat (type_or_decl, data_type, NULL);
*p = saved;
- return concat (qualifiers_then_data_type, " ", p, NULL);
+ return reconcat (qualifiers_then_data_type,
+ qualifiers_then_data_type, " ", p, NULL);
}
/* Given a tree node which represents some "function type", generate the