This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PR 6212


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]