On alignment

Robert Dewar dewar@gnat.com
Wed Apr 23 19:47:00 GMT 2003


> 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 :-)



More information about the Gcc mailing list