This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] for PR 17949
- From: Richard Henderson <rth at redhat dot com>
- To: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 31 Dec 2004 14:35:14 -0800
- Subject: Re: [patch] for PR 17949
- References: <20041231190536.GA16461@atrey.karlin.mff.cuni.cz>
On Fri, Dec 31, 2004 at 08:05:36PM +0100, Zdenek Dvorak wrote:
> I am not quite sure whether may_be_unaligned_p is correct.
It isn't. It's only going to work for structures for which
all elements are packed. It isn't going to work for
struct S {
int x;
char y;
int z __atribute__((packed));
};
You need to look at the DECL_ALIGN for the FIELD_DECL. I believe
that all you need is to look at the outermost such FIELD_DECL.
r~