diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-01-21 07:20:48 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-01-21 07:20:48 +0000 |
commit | 1869ca576befbe5457337f88ec2e183aa66eb96f (patch) | |
tree | 5a7be8ba6dc1abd3f95a537fbc5e0ad6a7afb4ef /gcc/cp/class.c | |
parent | 63b82f0a74f7ec778b00401a1a273c9df747b758 (diff) | |
download | gcc-1869ca576befbe5457337f88ec2e183aa66eb96f.tar.gz |
2010-01-21 Basile Starynkevitch <basile@starynkevitch.net>
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
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r-- | gcc/cp/class.c | 5 |
1 files changed, 5 insertions, 0 deletions
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); |