This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: On alignment
On 23 Apr 2003 10:00:22 -0600, Tom Tromey <tromey at redhat dot com> wrote:
> I'd like to find the most future-proof way to do this. In the above,
> is __alignof__(foo::x) the best way? I'm only concerned with
> alignment of fields.
It is since my recent patch to do all alignment calculation for fields in
layout_decl. Unfortunately, previous releases gave the wrong answer, and I
haven't moved that patch into 3.3. It should be possible to fix this more
simply in 3.3 by adding
DECL_ALIGN (field) = desired_align;
to the end of update_alignment_for_field.
Jason