/* Parse expressions for GDB.
- Copyright (C) 1986-2015 Free Software Foundation, Inc.
+ Copyright (C) 1986-2016 Free Software Foundation, Inc.
Modified from expread.y by the Department of Computer Science at the
State University of New York at Buffalo, 1991.
{
struct funcall *newobj;
- newobj = (struct funcall *) xmalloc (sizeof (struct funcall));
+ newobj = XNEW (struct funcall);
newobj->next = funcall_chain;
newobj->arglist_len = arglist_len;
arglist_len = 0;
{
ps->expout_size = initial_size;
ps->expout_ptr = 0;
- ps->expout = xmalloc (sizeof (struct expression)
- + EXP_ELEM_TO_BYTES (ps->expout_size));
+ ps->expout
+ = (struct expression *) xmalloc (sizeof (struct expression)
+ + EXP_ELEM_TO_BYTES (ps->expout_size));
ps->expout->language_defn = lang;
ps->expout->gdbarch = gdbarch;
}
|| tag == TYPE_CODE_STRUCT
|| tag == TYPE_CODE_ENUM);
expout_tag_completion_type = tag;
- expout_completion_name = xmalloc (length + 1);
+ expout_completion_name = (char *) xmalloc (length + 1);
memcpy (expout_completion_name, ptr, length);
expout_completion_name[length] = '\0';
}
if (namecopy_size < token.length + 1)
{
namecopy_size = token.length + 1;
- namecopy = xrealloc (namecopy, token.length + 1);
+ namecopy = (char *) xrealloc (namecopy, token.length + 1);
}
memcpy (namecopy, token.ptr, token.length);
case OP_F90_RANGE:
oplen = 3;
+ range_type = (enum f90_range_type)
+ longest_to_int (expr->elts[endpos - 2].longconst);
- range_type = longest_to_int (expr->elts[endpos - 2].longconst);
switch (range_type)
{
case LOW_BOUND_DEFAULT:
char *copy;
int n, num;
- copy = xmalloc (len + 1);
+ copy = (char *) xmalloc (len + 1);
memcpy (copy, p, len);
copy[len] = 0;
stack->size *= 2;
if (stack->size < howmuch)
stack->size = howmuch;
- stack->elements = xrealloc (stack->elements,
- stack->size * sizeof (union type_stack_elt));
+ stack->elements = XRESIZEVEC (union type_stack_elt, stack->elements,
+ stack->size);
}
}
void
type_stack_cleanup (void *arg)
{
- struct type_stack *stack = arg;
+ struct type_stack *stack = (struct type_stack *) arg;
xfree (stack->elements);
xfree (stack);
static int
exp_uses_objfile_iter (struct objfile *exp_objfile, void *objfile_voidp)
{
- struct objfile *objfile = objfile_voidp;
+ struct objfile *objfile = (struct objfile *) objfile_voidp;
if (exp_objfile->separate_debug_objfile_backlink)
exp_objfile = exp_objfile->separate_debug_objfile_backlink;