On alignment
Jason Merrill
jason@redhat.com
Wed Apr 23 18:06:00 GMT 2003
On 23 Apr 2003 10:00:22 -0600, Tom Tromey <tromey@redhat.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
More information about the Gcc
mailing list