From 5b18fa4cd800c94783b70c1cef1b711b424afe0d Mon Sep 17 00:00:00 2001 From: jason Date: Fri, 4 Nov 2011 17:15:02 +0000 Subject: PR c++/50965 * class.c (check_field_decls): NSDMI makes a class non-aggregate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180965 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/class.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gcc/cp/class.c') diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 41d182a4ca8..1775868aa8a 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -3189,6 +3189,12 @@ check_field_decls (tree t, tree *access_decls, no_const_asn_ref_p, &any_default_members); + /* Now that we've removed bit-field widths from DECL_INITIAL, + anything left in DECL_INITIAL is an NSDMI that makes the class + non-aggregate. */ + if (DECL_INITIAL (x)) + CLASSTYPE_NON_AGGREGATE (t) = true; + /* If any field is const, the structure type is pseudo-const. */ if (CP_TYPE_CONST_P (type)) { -- cgit v1.2.1