diff options
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r-- | gcc/cp/parser.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index e5b43b0..4316422 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -271,7 +271,7 @@ cp_lexer_new_main (void) /* Create the buffer. */ alloc = CP_LEXER_BUFFER_SIZE; - buffer = ggc_alloc (alloc * sizeof (cp_token)); + buffer = GGC_NEWVEC (cp_token, alloc); /* Put the first token in the buffer. */ space = alloc; @@ -8930,7 +8930,7 @@ cp_parser_template_argument_list (cp_parser* parser) if (arg_ary == fixed_args) { - arg_ary = xmalloc (sizeof (tree) * alloced); + arg_ary = XNEWVEC (tree, alloced); memcpy (arg_ary, fixed_args, sizeof (tree) * n_args); } else @@ -15770,7 +15770,7 @@ cp_parser_sizeof_operand (cp_parser* parser, enum rid keyword) saved_message = parser->type_definition_forbidden_message; /* And create the new one. */ parser->type_definition_forbidden_message - = xmalloc (strlen (format) + = XNEWVEC (const char, strlen (format) + strlen (IDENTIFIER_POINTER (ridpointers[keyword])) + 1 /* `\0' */); sprintf ((char *) parser->type_definition_forbidden_message, |