From c981d2231dfd8a3415450c1944b4e6c6e4cebadf Mon Sep 17 00:00:00 2001 From: Gabriel Dos Reis Date: Mon, 12 Dec 2005 09:14:12 +0000 Subject: varray.h: Allow compilation with a C++ compiler. * varray.h: Allow compilation with a C++ compiler. (union varray_data_tag): Prefix all field names with "vdt_". (VARRAY_CHAR, VARRAY_UCHAR, VARRAY_SHORT, VARRAY_USHORT, VARRAY_INT, VARRAY_UINT, VARRAY_LONG, VARRAY_ULONG, VARRAY_WIDE_INT, VARRAY_UWIDE_INT, VARRAY_GENERIC_PTR, VARRAY_GENERIC_PTR_NOGC, VARRAY_CHAR_PTR, VARRAY_RTX, VARRAY_RTVEC, VARRAY_TREE, VARRAY_BITMAP, VARRAY_REG, VARRAY_BB, VARRAY_ELT_LIST, VARRAY_EDGE, VARRAY_TREE_PTR): Adjust definition. (VARRAY_PUSH_CHAR, VARRAY_PUSH_UCHAR, VARRAY_PUSH_SHORT, VARRAY_PUSH_USHORT, VARRAY_PUSH_INT, VARRAY_PUSH_UINT, VARRAY_PUSH_LONG, VARRAY_PUSH_ULONG, VARRAY_PUSH_WIDE_INT, VARRAY_PUSH_UWIDE_INT, VARRAY_PUSH_GENERIC_PTR, VARRAY_PUSH_GENERIC_PTR_NOGC, VARRAY_PUSH_CHAR_PTR, VARRAY_PUSH_RTX, VARRAY_PUSH_RTVEC, VARRAY_PUSH_TREE, VARRAY_PUSH_BITMAP, VARRAY_PUSH_REG, VARRAY_PUSH_BB, VARRAY_PUSH_EDGE, VARRAY_PUSH_TREE_PTR): Likewise. (VARRAY_TOP_CHAR, VARRAY_TOP_UCHAR, VARRAY_TOP_SHORT, VARRAY_TOP_USHORT, VARRAY_TOP_INT, VARRAY_TOP_UINT, VARRAY_TOP_LONG, VARRAY_TOP_ULONG, VARRAY_TOP_WIDE_INT, VARRAY_TOP_UWIDE_INT, VARRAY_TOP_GENERIC_PTR, VARRAY_TOP_GENERIC_PTR_NOGC, VARRAY_TOP_CHAR_PTR, VARRAY_TOP_RTX, VARRAY_TOP_RTVEC, VARRAY_TOP_TREE, VARRAY_TOP_BITMAP, VARRAY_TOP_REG, VARRAY_TOP_BB, VARRAY_TOP_EDGE, VARRAY_TOP_TREE_PTR): Likewise. * varray.c (varray_grow): Likewise. (varray_clear): Likewise. From-SVN: r108399 --- gcc/varray.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/varray.c') diff --git a/gcc/varray.c b/gcc/varray.c index 6760a75..ceec027 100644 --- a/gcc/varray.c +++ b/gcc/varray.c @@ -176,7 +176,7 @@ varray_grow (varray_type va, size_t n) va = xrealloc (va, VARRAY_HDR_SIZE + data_size); va->num_elements = n; if (n > old_elements) - memset (&va->data.c[old_data_size], 0, data_size - old_data_size); + memset (&va->data.vdt_c[old_data_size], 0, data_size - old_data_size); #ifdef GATHER_STATISTICS if (oldva != va) desc->copied++; @@ -192,7 +192,7 @@ varray_clear (varray_type va) { size_t data_size = element[va->type].size * va->num_elements; - memset (va->data.c, 0, data_size); + memset (va->data.vdt_c, 0, data_size); va->elements_used = 0; } -- cgit v1.1