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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107887
138bc75d-0d04-0410-961f-
82ee72b054a4
+2005-12-02 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ * ggc.h (GGC_RESIZEVEC): New.
+
2005-12-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
* gcc.c (execute): Improve readability.
2005-12-02 Gabriel Dos Reis <gdr@integrable-solutions.net>
+ * 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.
+
+2005-12-02 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
* decl2.c (get_priority_info): Use XNEW, not xmalloc.
* decl.c (push_switch): Likewise.
* lex.c (handle_pragma_implementation): Likewise.
{
current_class_stack_size *= 2;
current_class_stack
- = xrealloc (current_class_stack,
- current_class_stack_size
- * sizeof (struct class_stack_node));
+ = XRESIZEVEC (struct class_stack_node, current_class_stack,
+ current_class_stack_size);
}
/* Insert a new entry on the class stack. */
{
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);
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;
}
#define GGC_CNEWVEC(T, N) ((T *) ggc_alloc_cleared ((N) * sizeof(T)))
#define GGC_NEWVAR(T, S) ((T *) ggc_alloc ((S)))
#define GGC_CNEWVAR(T, S) ((T *) ggc_alloc_cleared ((S)))
+#define GGC_RESIZEVEC(T, P, N) ((T *) ggc_realloc ((P), (N) * sizeof (T)))
#define ggc_alloc_rtvec(NELT) \
((rtvec) ggc_alloc_zone (sizeof (struct rtvec_def) + ((NELT) - 1) \