This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH c++ 12/12] ada-lang.h: Add cast in GROW_VECT
- From: Simon Marchi <simon dot marchi at polymtl dot ca>
- To: gdb-patches at sourceware dot org
- Cc: Simon Marchi <simon dot marchi at polymtl dot ca>
- Date: Sun, 25 Oct 2015 23:49:22 -0400
- Subject: [PATCH c++ 12/12] ada-lang.h: Add cast in GROW_VECT
- Authentication-results: sourceware.org; auth=none
- References: <1445831362-18789-1-git-send-email-simon dot marchi at polymtl dot ca>
The assignment requires a cast in C++.
gdb/ChangeLog:
* ada-lang.h (GROW_VECT): Add cast.
---
gdb/ada-lang.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h
index 62896f1..32c4b55 100644
--- a/gdb/ada-lang.h
+++ b/gdb/ada-lang.h
@@ -147,7 +147,7 @@ struct ada_task_info
least M objects, updating V and S as necessary. */
#define GROW_VECT(v, s, m) \
- if ((s) < (m)) (v) = grow_vect (v, &(s), m, sizeof *(v));
+ if ((s) < (m)) (v) = (typeof (v)) grow_vect (v, &(s), m, sizeof *(v));
extern void *grow_vect (void *, size_t *, size_t, int);
--
2.6.2