diff options
author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-09-24 22:38:22 +0000 |
---|---|---|
committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-09-24 22:38:22 +0000 |
commit | 0be2ebc785cd4b366423534d0bfdce0499483e80 (patch) | |
tree | 7ec3b888341991cdf8a157f5d87a6dea617363e5 /gcc | |
parent | 347e5e07ef4db24f295a4513b381bbb943ddf9f4 (diff) | |
download | ppe42-gcc-0be2ebc785cd4b366423534d0bfdce0499483e80.tar.gz ppe42-gcc-0be2ebc785cd4b366423534d0bfdce0499483e80.zip |
include:
* libiberty.h (reconcat): New function.
libiberty:
* concat.c (reconcat): New function.
gcc:
* c-aux-info.c (affix_data_type): Use ATTRIBUTE_MALLOC. Avoid
leak by passing malloc'ed pointer to reconcat, not concat.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45789 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/c-aux-info.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b5c46950ebd..66792a3df58 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2001-09-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * c-aux-info.c (affix_data_type): Use ATTRIBUTE_MALLOC. Avoid + leak by passing malloc'ed pointer to reconcat, not concat. + 2001-09-24 DJ Delorie <dj@redhat.com> * varasm.c (array_size_for_constructor): Handle STRING_CSTs also. diff --git a/gcc/c-aux-info.c b/gcc/c-aux-info.c index c9daa1d96a1..67ecae6cea1 100644 --- a/gcc/c-aux-info.c +++ b/gcc/c-aux-info.c @@ -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)); @@ -96,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 |