This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix 21166
- From: Richard Henderson <rth at redhat dot com>
- To: Nathan Sidwell <nathan at codesourcery dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 28 Apr 2005 15:40:19 -0700
- Subject: Re: Fix 21166
- References: <4270A58A.3010704@codesourcery.com>
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~