public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "sabre at nondot dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/23071] New: Darwin alignment ignores "attribute packed" for first 'double' element of a struct
Date: Tue, 26 Jul 2005 07:07:00 -0000	[thread overview]
Message-ID: <20050726064238.23071.sabre@nondot.org> (raw)

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


             reply	other threads:[~2005-07-26  6:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-26  7:07 sabre at nondot dot org [this message]
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 gcc dot gnu dot org
2005-07-26 17:02 ` dje at watson dot ibm dot com
2005-07-26 17:03 ` dje at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050726064238.23071.sabre@nondot.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).