public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/23071] New: Darwin alignment ignores "attribute packed" for first 'double' element of a struct
@ 2005-07-26  7:07 sabre at nondot dot org
  2005-07-26 13:21 ` [Bug target/23071] " pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: sabre at nondot dot org @ 2005-07-26  7:07 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 12+ messages in thread
[parent not found: <bug-23071-6809@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2010-03-22 23:24 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-26  7:07 [Bug target/23071] New: Darwin alignment ignores "attribute packed" for first 'double' element of a struct sabre at nondot dot org
2005-07-26 13:21 ` [Bug target/23071] " pinskia at gcc dot gnu dot org
2005-07-26 14:27 ` dje at gcc dot gnu dot org
2005-07-26 16:28 ` sabre at nondot dot org
2005-07-26 16:58 ` ian at airs dot com
2005-07-26 17:02 ` dje at watson dot ibm dot com
2005-07-26 17:02 ` dje at gcc dot gnu dot org
2005-07-26 17:03 ` dje at gcc dot gnu dot org
     [not found] <bug-23071-6809@http.gcc.gnu.org/bugzilla/>
2010-03-22 23:13 ` mrs at gcc dot gnu dot org
2010-03-22 23:18 ` mikestump at comcast dot net
2010-03-22 23:21 ` mrs at gcc dot gnu dot org
2010-03-22 23:24 ` mrs at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).