This is the mail archive of the
mailing list for the GCC project.
Re: __attribute__ aligned could be more efficient
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: Mason <slash dot tmp at free dot fr>
- Cc: GCC dev <gcc at gcc dot gnu dot org>
- Date: Sun, 29 Mar 2015 17:35:38 +0200
- Subject: Re: __attribute__ aligned could be more efficient
- Authentication-results: sourceware.org; auth=none
- References: <5518180F dot 4030806 at free dot fr>
Mason <email@example.com> writes:
> Hello everyone,
> Consider the following program.
This mailing list is about the development of gcc, for user questions
please use firstname.lastname@example.org instead.
> gcc lays out bar2 like this:
> foo2(80) padding(48) i(4) padding(60)
struct foo2 has size 128, not 80. The padding is part of the type.
> But it seems (to me) that gcc could fit the "int" field in the
> first padding, to save space:
> foo2(80) i(4) padding(44)
Structure members cannot overlap.
Andreas Schwab, email@example.com
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."