This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/21166] g++ gives error on reference to packed structure elements
- From: "nathan at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Nov 2005 10:34:35 -0000
- Subject: [Bug c++/21166] g++ gives error on reference to packed structure elements
- References: <bug-21166-10179@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from nathan at gcc dot gnu dot org 2005-11-28 10:34 -------
Subject: Bug 21166
Author: nathan
Date: Mon Nov 28 10:34:30 2005
New Revision: 107599
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107599
Log:
.:
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.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-common.c
trunk/gcc/c-decl.c
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/class.c
trunk/gcc/stor-layout.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21166