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: [patch] for PR 17949


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~


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