aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/class.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 71f7d0b..785c926 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2005-11-28 Nathan Sidwell <nathan@codesourcery.com>
+
+ PR c++/21166
+ * class.c (check_field_decls): Only set DECL_PACKED on a field
+ when its natural alignment is > BITS_PER_UNIT.
+
2005-11-27 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/24979
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 7c43d3b..647b7cb 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -2801,7 +2801,7 @@ check_field_decls (tree t, tree *access_decls,
(0,
"ignoring packed attribute on unpacked non-POD field %q+#D",
x);
- else
+ else if (TYPE_ALIGN (TREE_TYPE (x)) > BITS_PER_UNIT)
DECL_PACKED (x) = 1;
}