public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Chris Lattner <sabre@nondot.org>
To: Ian Lance Taylor <ian@airs.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: attribute aligned(4) ignored
Date: Tue, 26 Jul 2005 05:57:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.61.0507260051230.12411@nondot.org> (raw)
In-Reply-To: <m3pst6f8bf.fsf@gossamer.airs.com>

On Tue, 25 Jul 2005, Ian Lance Taylor wrote:
>> ... the struct maintains its 8-byte alignment even though nothing
>> inside of it requires 8-byte alignment any more.
>
> When I try that with a powerpc-eabi compiler, it appears to generates
> a struct with a size of 12 bytes and an alignment of 4 bytes.  Do you
> not see that with a Darwin compiler?  What target are you configuring
> for?  What sources are you using?

This is a powerpc-darwin specific issue I believe.  The Darwin ABI states 
(roughly) that doubles have 4-byte alignment, unless they are the first 
element of a structure (in which they have 8-byte alignment).  I think 
this is a holdover from AIX compatibility.

It is my guess that this ABI rule is overruling the user request, but I 
don't really know how to go about verifying this, or working around it :(

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/

  reply	other threads:[~2005-07-26  5:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-26  1:04 Chris Lattner
2005-07-26  3:22 ` Ian Lance Taylor
2005-07-26  4:58   ` Chris Lattner
2005-07-26  5:02     ` corey taylor
2005-07-26  5:04       ` Chris Lattner
2005-07-26  5:25     ` Ian Lance Taylor
2005-07-26  5:57       ` Chris Lattner [this message]
2005-07-26  6:27         ` Ian Lance Taylor
2005-07-26  6:44           ` Chris Lattner

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=Pine.LNX.4.61.0507260051230.12411@nondot.org \
    --to=sabre@nondot.org \
    --cc=gcc-help@gcc.gnu.org \
    --cc=ian@airs.com \
    /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).