From 1869ca576befbe5457337f88ec2e183aa66eb96f Mon Sep 17 00:00:00 2001 From: bstarynk Date: Thu, 21 Jan 2010 07:20:48 +0000 Subject: 2010-01-21 Basile Starynkevitch MELT branch merged with trunk rev 156107 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@156108 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/class.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gcc/cp/class.c') diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 16d566682a6..f88914d3c22 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -5216,6 +5216,11 @@ layout_class_type (tree t, tree *virtuals_p) build_decl (input_location, FIELD_DECL, NULL_TREE, char_type_node)); + /* If this is a non-POD, declaring it packed makes a difference to how it + can be used as a field; don't let finalize_record_size undo it. */ + if (TYPE_PACKED (t) && !layout_pod_type_p (t)) + rli->packed_maybe_necessary = true; + /* Let the back end lay out the type. */ finish_record_layout (rli, /*free_p=*/true); -- cgit v1.2.1