This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PR 6212
- From: Richard Henderson <rth at redhat dot com>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 7 May 2002 14:41:31 -0700
- Subject: Re: PR 6212
- References: <10205072040.AA29234@vlsi1.ultra.nyu.edu>
On Tue, May 07, 2002 at 04:40:34PM -0400, Richard Kenner wrote:
> but what's *is* true is that the alignment of the *type* of X[J} may
> be smaller than that of the *type* of Y. Think of a bitfield or a
> packed field.
Err, no, that is not true. A packed field has a type with
TYPE_PACKED set and TYPE_ALIGN set to the minimum.
Bitfields may be confused in general, but for most targets, the
alignment of the bitfield type still affects the alignment of
the struct. That is
struct S {
unsigned long x : 1;
};
struct T {
unsigned int x : 1;
};
the alignments of these two structs differ. If in fact they
are confused, this should be fixed on mainline.
r~