This is the mail archive of the gcc-patches@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: Fix 21166


On Thu, Apr 28, 2005 at 09:57:46AM +0100, Nathan Sidwell wrote:
> +   /* If the alignment is one unit, then we're not really packed.  */
> +   if (TREE_CODE (decl) == FIELD_DECL && DECL_ALIGN (decl) == BITS_PER_UNIT)
> +     DECL_PACKED (decl) = 0;

I think you mean TYPE_ALIGN, but even then I'm not 100% sure.
Test cases:

  struct s1 {
	int c __attribute__((packed));
  } __attribute__((packed));

  struct s2 {
	struct s1 s __attribute__((packed));
  } __attribute__((packed));


r~


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