diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-03-23 08:56:02 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-03-23 08:56:02 +0000 |
commit | 8222ea4b6d0d19cd5cc860f24a02896577ff41cc (patch) | |
tree | 70f21e8dae3bc404f841f5e72c4f9b383cbea207 /gcc/cp/class.c | |
parent | 5dec75684b8a6935aa1f7c18284342102bbe85f2 (diff) | |
download | gcc-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.c | 5 |
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: |