aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.c
diff options
context:
space:
mode:
authorGabriel Dos Reis <gdr@integrable-solutions.net>2005-12-02 12:37:15 +0000
committerGabriel Dos Reis <gdr@gcc.gnu.org>2005-12-02 12:37:15 +0000
commit7767580e64c75a8f2742013c91f55879c15d9386 (patch)
tree474c190b932ebf02d011761d4c2e922cc80f4ac6 /gcc/cp/parser.c
parenteeac616e62b2f1669fc5b0de912527b95fb81f6e (diff)
downloadgcc-7767580e64c75a8f2742013c91f55879c15d9386.zip
gcc-7767580e64c75a8f2742013c91f55879c15d9386.tar.gz
gcc-7767580e64c75a8f2742013c91f55879c15d9386.tar.bz2
ggc.h (GGC_RESIZEVEC): New.
* ggc.h (GGC_RESIZEVEC): New. cp/ * parser.c (cp_lexer_new_main): Usr GGC_RESIZEVEC instead of ggc_realloc. (cp_parser_template_argument_list): Use XRESIZEVEC instead of xrealloc. * class.c (pushclass): Likewise. From-SVN: r107887
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r--gcc/cp/parser.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 4316422..8eb4fbf 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -286,7 +286,7 @@ cp_lexer_new_main (void)
{
space = alloc;
alloc *= 2;
- buffer = ggc_realloc (buffer, alloc * sizeof (cp_token));
+ buffer = GGC_RESIZEVEC (cp_token, buffer, alloc);
pos = buffer + space;
}
cp_lexer_get_preprocessor_token (lexer, pos);
@@ -8934,7 +8934,7 @@ cp_parser_template_argument_list (cp_parser* parser)
memcpy (arg_ary, fixed_args, sizeof (tree) * n_args);
}
else
- arg_ary = xrealloc (arg_ary, sizeof (tree) * alloced);
+ arg_ary = XRESIZEVEC (tree, arg_ary, alloced);
}
arg_ary[n_args++] = argument;
}