aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/class.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/class.cc')
-rw-r--r--gcc/cp/class.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/class.cc b/gcc/cp/class.cc
index 9d4d95f..4766b7c 100644
--- a/gcc/cp/class.cc
+++ b/gcc/cp/class.cc
@@ -6962,7 +6962,8 @@ layout_class_type (tree t, tree *virtuals_p)
check_bitfield_decl eventually sets DECL_SIZE (field)
to that width. */
&& (DECL_SIZE (field) == NULL_TREE
- || integer_zerop (DECL_SIZE (field))))
+ || integer_zerop (DECL_SIZE (field)))
+ && TREE_TYPE (field) != error_mark_node)
SET_DECL_FIELD_CXX_ZERO_WIDTH_BIT_FIELD (field, 1);
check_non_pod_aggregate (field);
}