This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/23071] New: Darwin alignment ignores "attribute packed" for first 'double' element of a struct
- From: "sabre at nondot dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Jul 2005 06:42:39 -0000
- Subject: [Bug target/23071] New: Darwin alignment ignores "attribute packed" for first 'double' element of a struct
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Darwin ignores the alignment/packed attributes on this structure, forcing the
structure to have 8-byte alignment and 16-byte size:
---
struct Test {
double D __attribute__((packed,aligned(4)));
short X;
};
---
Ian Lance Taylor did a great analysis of the history of this, tracking it back
to a patch by David Edelsohn in 1996. The analysis is here:
http://gcc.gnu.org/ml/gcc-help/2005-07/msg00280.html
-Chris
--
Summary: Darwin alignment ignores "attribute packed" for first
'double' element of a struct
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: target
AssignedTo: dje at watson dot ibm dot com
ReportedBy: sabre at nondot dot org
CC: gcc-bugs at gcc dot gnu dot org,ian at airs dot com
GCC host triplet: powerpc-darwin-*
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23071