* ada-lang.c (grow_vect): Return the new array instead of

expecting pointer to pointer to avoid violation of aliasing rules.
	* ada-lang.h (GROW_VECT): Adapt call to grow_vect.
This commit is contained in:
Andreas Schwab 2004-10-23 19:13:26 +00:00
parent 0fd555c412
commit f27cf670a8
3 changed files with 14 additions and 7 deletions

View file

@ -171,9 +171,9 @@ extern struct task_entry *task_list;
least M objects, updating V and S as necessary. */
#define GROW_VECT(v, s, m) \
if ((s) < (m)) grow_vect ((void**) &(v), &(s), (m), sizeof(*(v)));
if ((s) < (m)) (v) = grow_vect (v, &(s), m, sizeof *(v));
extern void grow_vect (void **, size_t *, size_t, int);
extern void *grow_vect (void *, size_t *, size_t, int);
extern int ada_get_field_index (const struct type *type,
const char *field_name,