aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-lang.h
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2004-10-23 19:13:26 +0000
committerAndreas Schwab <schwab@linux-m68k.org>2004-10-23 19:13:26 +0000
commitf27cf670a8729e84799f86c25401fe1be5cd2e51 (patch)
treeb545725767b1783c3ee8d65e2a6d711e1a0debbb /gdb/ada-lang.h
parent0fd555c412ecfb816f441dce78a3f288c49eb8e5 (diff)
downloadgdb-f27cf670a8729e84799f86c25401fe1be5cd2e51.zip
gdb-f27cf670a8729e84799f86c25401fe1be5cd2e51.tar.gz
gdb-f27cf670a8729e84799f86c25401fe1be5cd2e51.tar.bz2
* 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.
Diffstat (limited to 'gdb/ada-lang.h')
-rw-r--r--gdb/ada-lang.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h
index 18a662a..3df4aa4 100644
--- a/gdb/ada-lang.h
+++ b/gdb/ada-lang.h
@@ -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,