aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2001-09-17 18:48:45 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2001-09-17 18:48:45 +0000
commitc1d49704bcc084245adffb45a22d43a841665515 (patch)
treed0168824c3517b671ef6a4c4bbf09f335edd2800 /gcc
parent14baae01f63af3ef58bf9a0923a92d0de7098891 (diff)
downloadgcc-c1d49704bcc084245adffb45a22d43a841665515.zip
gcc-c1d49704bcc084245adffb45a22d43a841665515.tar.gz
gcc-c1d49704bcc084245adffb45a22d43a841665515.tar.bz2
libiberty.h (ASTRDUP): New macro.
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. From-SVN: r45657
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/c-aux-info.c4
2 files changed, 6 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8b0fe94..554b252 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2001-09-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * c-aux-info.c (affix_data_type): Use ASTRDUP in lieu of
+ alloca/strcpy.
+
2001-09-17 Neil Booth <neil@daikokuya.demon.co.uk>
* cpphash.h (_cpp_lex_direct): New.
diff --git a/gcc/c-aux-info.c b/gcc/c-aux-info.c
index ee9c516..c9daa1d 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 (;;)