This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: On alignment
- From: dewar at gnat dot com (Robert Dewar)
- To: jamie at shareable dot org, joern dot rennecke at superh dot com
- Cc: aph at redhat dot com, gcc at gcc dot gnu dot org, jason at redhat dot com, schwab at suse dot de
- Date: Wed, 23 Apr 2003 15:24:55 -0400 (EDT)
- Subject: Re: On alignment
> 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.
Yes, but so what, just because you can find an example where you can't
improve things is no reason not to improve things when you can :-)