summaryrefslogtreecommitdiff
path: root/gcc/cp/cp-tree.h
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2002-10-21 08:40:24 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2002-10-21 08:40:24 +0000
commit5671723d4ce1dc0331e4d13a64484a67e0a6f5c9 (patch)
tree6ec5aa6e54097ca287116667434de18a185afc25 /gcc/cp/cp-tree.h
parent3421d57239f17e77aab044644726c8557f290ebc (diff)
downloadgcc-5671723d4ce1dc0331e4d13a64484a67e0a6f5c9.tar.gz
PR c++/8218
* cp-tree.h (lang_type_class): Add contains_empty_class_p. (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro. * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P. (check_field_decls): Likewise. (layout_class_type): Likewise. (finish_struct_1): Initialize it. (walk_subobject_offsets): Use it to prune searches. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58356 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r--gcc/cp/cp-tree.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 52f921cab84..06e80b58601 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -1135,6 +1135,7 @@ struct lang_type_class GTY(())
unsigned anon_aggr : 1;
unsigned non_zero_init : 1;
unsigned empty_p : 1;
+ unsigned contains_empty_class_p : 1;
/* When adding a flag here, consider whether or not it ought to
apply to a template instance if it applies to the template. If
@@ -1143,7 +1144,7 @@ struct lang_type_class GTY(())
/* There are some bits left to fill out a 32-bit word. Keep track
of this by updating the size of this bitfield whenever you add or
remove a flag. */
- unsigned dummy : 5;
+ unsigned dummy : 4;
int vsize;
@@ -1457,6 +1458,10 @@ struct lang_type GTY(())
#define CLASSTYPE_NEARLY_EMPTY_P(NODE) \
(LANG_TYPE_CLASS_CHECK (NODE)->nearly_empty_p)
+/* Nonzero if this class contains an empty subobject. */
+#define CLASSTYPE_CONTAINS_EMPTY_CLASS_P(NODE) \
+ (LANG_TYPE_CLASS_CHECK (NODE)->contains_empty_class_p)
+
/* A list of class types of which this type is a friend. The
TREE_VALUE is normally a TYPE, but will be a TEMPLATE_DECL in the
case of a template friend. */