summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/dwarf2out.c6
-rw-r--r--gcc/dwarf2out.h2
3 files changed, 12 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index bd424cbdf58..feedbaf1b3d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2017-03-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/79821
+ * dwarf2out.h (dw_vec_const): Change array type from unsigned char *
+ to void * for PCH reasons.
+ * dwarf2out.c (output_loc_operands, output_die): Cast
+ v.val_vec.array to unsigned char *.
+
2017-03-06 John David Anglin <danglin@gcc.gnu.org>
PR target 77850
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 87060a33804..0bbb90ed3aa 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -2020,7 +2020,7 @@ output_loc_operands (dw_loc_descr_ref loc, int for_eh_or_skip)
elt_size /= 2;
len *= 2;
}
- for (i = 0, p = val2->v.val_vec.array;
+ for (i = 0, p = (unsigned char *) val2->v.val_vec.array;
i < len;
i++, p += elt_size)
dw2_asm_output_data (elt_size, extract_int (p, elt_size),
@@ -2273,7 +2273,7 @@ output_loc_operands (dw_loc_descr_ref loc, int for_eh_or_skip)
elt_size /= 2;
len *= 2;
}
- for (i = 0, p = val2->v.val_vec.array;
+ for (i = 0, p = (unsigned char *) val2->v.val_vec.array;
i < len;
i++, p += elt_size)
dw2_asm_output_data (elt_size, extract_int (p, elt_size),
@@ -10105,7 +10105,7 @@ output_die (dw_die_ref die)
elt_size /= 2;
len *= 2;
}
- for (i = 0, p = a->dw_attr_val.v.val_vec.array;
+ for (i = 0, p = (unsigned char *) a->dw_attr_val.v.val_vec.array;
i < len;
i++, p += elt_size)
dw2_asm_output_data (elt_size, extract_int (p, elt_size),
diff --git a/gcc/dwarf2out.h b/gcc/dwarf2out.h
index 79dc4391753..940247316d3 100644
--- a/gcc/dwarf2out.h
+++ b/gcc/dwarf2out.h
@@ -163,7 +163,7 @@ enum dw_val_class
/* Describe a floating point constant value, or a vector constant value. */
struct GTY(()) dw_vec_const {
- unsigned char * GTY((atomic)) array;
+ void * GTY((atomic)) array;
unsigned length;
unsigned elt_size;
};