re PR c++/21166 (g++ gives error on reference to packed structure elements)
authorNathan Sidwell <nathan@codesourcery.com>
Mon, 28 Nov 2005 10:34:30 +0000 (10:34 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Mon, 28 Nov 2005 10:34:30 +0000 (10:34 +0000)
commit646c0835465a8438ce3543bfcae30becf641a63e
tree7e925b64a93bd395a2f07912807080dfbe0ecd38
parentbbee4b64682d27f5ea99df3654e3e1b139443e0e
re PR c++/21166 (g++ gives error on reference to packed structure elements)

.: PR c++/21166
* c-decl.c (finish_struct):  Only set DECL_PACKED on a field
when its natural alignment is > BITS_PER_UNIT.
* stor-layout.c (finalize_type_size): Revert my patch of 2005-08-08.
* c-common.c (handle_packed_attribute): Ignore packing on a field
whose type is naturally char aligned.
cp:
PR c++/21166
* class.c (check_field_decls): Only set DECL_PACKED on a field
when its natural alignment is > BITS_PER_UNIT.

From-SVN: r107599
gcc/ChangeLog
gcc/c-common.c
gcc/c-decl.c
gcc/cp/ChangeLog
gcc/cp/class.c
gcc/stor-layout.c