This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: are statically allocated structs always aligned to a machine word on x86/x86_64?
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- Cc: john smith <wempwer at gmail dot com>, gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Sun, 23 Aug 2015 06:05:39 -0500
- Subject: Re: are statically allocated structs always aligned to a machine word on x86/x86_64?
- Authentication-results: sourceware.org; auth=none
- References: <CAKmQUfZT04z8pd9bvqazEPkV1iqRrUxw82nxd3RbOerVbyxqhA at mail dot gmail dot com> <CAH6eHdQdAt1sqtnZe7CiJtWKb_SeggnXieiiR7Wf4D8Uf1sLyg at mail dot gmail dot com> <CAKmQUfbuZ-tbggq8iCxYd4G_VSnVgbS-jBzPc6AYxQhRtN65GQ at mail dot gmail dot com> <CAH6eHdQUBc_Rh_zcTD1hKvCV=XPt9KHupGgFcT2aks-fu=BS3g at mail dot gmail dot com>
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?
Segher