summaryrefslogtreecommitdiffstats
path: root/gcc/cp/mangle.c
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2001-09-15 14:04:47 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2001-09-15 14:04:47 +0000
commit479501397830fc36512a0f7401bbc24f335ab7d3 (patch)
tree45aae5c4dc09289e3c64fd42746ee1cea71aa7be /gcc/cp/mangle.c
parent3de1a9032fed45f9214dc6cd7b21e30fdaa13a4c (diff)
downloadppe42-gcc-479501397830fc36512a0f7401bbc24f335ab7d3.tar.gz
ppe42-gcc-479501397830fc36512a0f7401bbc24f335ab7d3.zip
* collect2.c (main): Const-ification.
* gcc.c (translate_options, process_command): Use xstrdup in lieu of xmalloc/strcpy. (main): Use concat in lieu of xmalloc/strcpy/strcat. cp: * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of xmalloc/strcpy/strcat. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45631 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/mangle.c')
-rw-r--r--gcc/cp/mangle.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c
index 6e94681e51e..6ad9ffa3f26 100644
--- a/gcc/cp/mangle.c
+++ b/gcc/cp/mangle.c
@@ -2392,11 +2392,7 @@ mangle_conv_op_name_for_type (type)
/* Build the mangling for TYPE. */
const char *mangled_type = mangle_type_string (type);
/* Allocate a temporary buffer for the complete name. */
- char *op_name = (char *) xmalloc (strlen ("operator ")
- + strlen (mangled_type) + 1);
- /* Assemble the mangling. */
- strcpy (op_name, "operator ");
- strcat (op_name, mangled_type);
+ char *op_name = concat ("operator ", mangled_type, NULL);
/* Find or create an identifier. */
identifier = get_identifier (op_name);
/* Done with the temporary buffer. */
OpenPOWER on IntegriCloud