From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: john smith <wempwer@gmail.com>, gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: are statically allocated structs always aligned to a machine word on x86/x86_64?
Date: Sun, 23 Aug 2015 15:23:00 -0000 [thread overview]
Message-ID: <CAH6eHdRjf=khsX+5FSQ+a0ZUZv9GpMai_6UGzOdA=9zEVMAF9A@mail.gmail.com> (raw)
In-Reply-To: <20150823151913.GB16487@gate.crashing.org>
On 23 August 2015 at 16:19, Segher Boessenkool wrote:
> On Sun, Aug 23, 2015 at 02:49:17PM +0100, Jonathan Wakely wrote:
>> On 23 August 2015 at 12:05, Segher Boessenkool wrote:
>> > On Sun, Aug 23, 2015 at 12:15:56AM +0100, Jonathan Wakely wrote:
>> >> because alignments must be a power of 2.
>> >
>> > That is true in C++, but not true in C or even POSIX afaics?
>>
>> C11 §6.2.8
>>
>> "Every valid alignment value shall be a nonnegative integral power of two."
>
> Ah, that is hidden deep in /4, I didn't see it :-) This is new
> in C11 it seems?
Yes, quite possibly, I don't have anything older than C11 on this
machine to check though.
prev parent reply other threads:[~2015-08-23 15:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-21 18:39 john smith
2015-08-21 18:49 ` Jonathan Wakely
2015-08-21 19:31 ` john smith
2015-08-22 23:16 ` Jonathan Wakely
2015-08-23 11:05 ` Segher Boessenkool
2015-08-23 13:49 ` Jonathan Wakely
2015-08-23 13:52 ` Jonathan Wakely
2015-08-23 15:19 ` Segher Boessenkool
2015-08-23 15:23 ` Jonathan Wakely [this message]
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='CAH6eHdRjf=khsX+5FSQ+a0ZUZv9GpMai_6UGzOdA=9zEVMAF9A@mail.gmail.com' \
--to=jwakely.gcc@gmail.com \
--cc=gcc-help@gcc.gnu.org \
--cc=segher@kernel.crashing.org \
--cc=wempwer@gmail.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).