diff options
author | nickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-01-05 23:31:43 +0000 |
---|---|---|
committer | nickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-01-05 23:31:43 +0000 |
commit | c677d652f0a03564b77399d84deb558a3c519656 (patch) | |
tree | 3a078b6c91eab7ae96d3d943cd726eabc498ac9c /gcc | |
parent | 9b15aa3dab71c5017ded5c4e8210da38af290201 (diff) | |
download | ppe42-gcc-c677d652f0a03564b77399d84deb558a3c519656.tar.gz ppe42-gcc-c677d652f0a03564b77399d84deb558a3c519656.zip |
Use alloca to create temporary string for initialisation before calling
ggc_alloc_string.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38732 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/v850/v850.c | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7c224ee9fdf..77de02328dc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2001-01-05 Nick Clifton <nickc@redhat.com> + + * config/v850/v850.c (v850_encode_data_area): Use alloca to create + temporary string for initialisation before calling ggc_alloc_string. + 2001-01-06 Michael Hayes <mhayes@redhat.com> * rtl.h (print_simple_rtl): New. diff --git a/gcc/config/v850/v850.c b/gcc/config/v850/v850.c index 8fd16026719..c30b6e8651c 100644 --- a/gcc/config/v850/v850.c +++ b/gcc/config/v850/v850.c @@ -1,5 +1,5 @@ /* Subroutines for insn-output.c for NEC V850 series - Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. Contributed by Jeff Law (law@cygnus.com). This file is part of GNU CC. @@ -2136,7 +2136,7 @@ v850_encode_data_area (decl) return; } - newstr = ggc_alloc_string (NULL, len + 2); + newstr = alloca (len + 2); strcpy (newstr + 1, str); @@ -2148,7 +2148,7 @@ v850_encode_data_area (decl) default: abort (); } - XSTR (XEXP (DECL_RTL (decl), 0), 0) = newstr; + XSTR (XEXP (DECL_RTL (decl), 0), 0) = ggc_alloc_string (newstr, len + 2); } /* Return true if the given RTX is a register which can be restored |