OSDN Git Service

* reload1.c (reload_cse_simplify): Fix typo in rtx code check.
[pf3gnuchains/gcc-fork.git] / gcc / c-aux-info.c
index ee9c516..67ecae6 100644 (file)
@@ -39,7 +39,7 @@ typedef enum formals_style_enum formals_style;
 
 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));
@@ -64,13 +64,11 @@ static char *
 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 (;;)
@@ -98,7 +96,8 @@ affix_data_type (param)
   *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