This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/23071] Darwin alignment ignores "attribute packed" for first 'double' element of a struct
- From: "mikestump at comcast dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Mar 2010 23:18:32 -0000
- Subject: [Bug target/23071] Darwin alignment ignores "attribute packed" for first 'double' element of a struct
- References: <bug-23071-6809@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from mikestump at comcast dot net 2010-03-22 23:18 -------
The previous behavior was fairly broken, adding packed, _increased_ the
alignment. A user that adds packing, never wants more alignment:
struct Test {
double D __attribute__((packed,aligned(4)));
short X;
} x;
struct {
char x;
struct Test t;
} b = { 1, { 2, 3}};
compared to:
struct Test {
double D /* __attribute__((packed,aligned(4))) */;
short X;
} x;
struct {
char x;
struct Test t;
} b = { 1, { 2, 3}};
--
mikestump at comcast dot net changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mikestump at comcast dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23071