aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/class.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r--gcc/cp/class.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 99bfa95..5f50aff 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -3659,8 +3659,8 @@ check_field_decls (tree t, tree *access_decls,
/* 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))
+ non-aggregate in C++11. */
+ if (DECL_INITIAL (x) && cxx_dialect < cxx14)
CLASSTYPE_NON_AGGREGATE (t) = true;
/* If any field is const, the structure type is pseudo-const. */