summaryrefslogtreecommitdiff
path: root/gcc/cp/class.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2012-03-23 08:56:02 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2012-03-23 08:56:02 +0000
commit8222ea4b6d0d19cd5cc860f24a02896577ff41cc (patch)
tree70f21e8dae3bc404f841f5e72c4f9b383cbea207 /gcc/cp/class.c
parent5dec75684b8a6935aa1f7c18284342102bbe85f2 (diff)
downloadgcc-8222ea4b6d0d19cd5cc860f24a02896577ff41cc.tar.gz
2012-03-23 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 185727 using svnmerge git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@185729 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r--gcc/cp/class.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 6ed4cde6b51..bc17c82c6a0 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -3149,8 +3149,9 @@ check_field_decls (tree t, tree *access_decls,
CLASSTYPE_NON_AGGREGATE (t) = 1;
/* If at least one non-static data member is non-literal, the whole
- class becomes non-literal. */
- if (!literal_type_p (type))
+ class becomes non-literal. Note: if the type is incomplete we
+ will complain later on. */
+ if (COMPLETE_TYPE_P (type) && !literal_type_p (type))
CLASSTYPE_LITERAL_P (t) = false;
/* A standard-layout class is a class that: