This is the mail archive of the gcc@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: On alignment


> For the same reason, "struct foo { double x; }" as a standalone
> variable should have alignment 8, not 4.  Andrew's test shows it has
> an alignment of 4.

Well, what about struct bar { double x; int y; double z; } ?
giving it an alignment of 8 doesn't improve things, as one double will
always be misaligned.  OTOH it is odd to have a lower alignment for
bar than for foo, even though the start of bar has the same structure
as the entirety of foo.

-- 
--------------------------
SuperH (UK) Ltd.
2410 Aztec West / Almondsbury / BRISTOL / BS32 4QX
T:+44 1454 465658


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