summaryrefslogtreecommitdiff
path: root/gcc/cp/class.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r--gcc/cp/class.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index f6ad696c8f1..1027dad6d30 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -8361,6 +8361,8 @@ is_really_empty_class (tree type)
for (field = TYPE_FIELDS (type); field; field = DECL_CHAIN (field))
if (TREE_CODE (field) == FIELD_DECL
&& !DECL_ARTIFICIAL (field)
+ /* An unnamed bit-field is not a data member. */
+ && (DECL_NAME (field) || !DECL_C_BIT_FIELD (field))
&& !is_really_empty_class (TREE_TYPE (field)))
return false;
return true;