From add62f6afea7118bc01b8ca9dfabf1062fb65031 Mon Sep 17 00:00:00 2001 From: ghazi Date: Mon, 17 Sep 2001 18:48:45 +0000 Subject: include: * libiberty.h (ASTRDUP): New macro. libiberty_optr, libiberty_nptr, libiberty_len): Declare. libiberty: * alloca.c (libiberty_optr, libiberty_nptr, libiberty_len): Define. gcc: * c-aux-info.c (affix_data_type): Use ASTRDUP in lieu of alloca/strcpy. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45657 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/c-aux-info.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'gcc/c-aux-info.c') diff --git a/gcc/c-aux-info.c b/gcc/c-aux-info.c index ee9c5165815..c9daa1d96a1 100644 --- a/gcc/c-aux-info.c +++ b/gcc/c-aux-info.c @@ -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 (;;) -- cgit v1.2.1