Structure Alignment Bug in Sparc.
David Edelsohn
dje@watson.ibm.com
Tue Aug 19 17:21:00 GMT 2003
>>>>> Nitin Gupta writes:
Nitin> What causes compiler to assume that if a structure contains
Nitin> "long long" (64 bit) member any where (and not as the first member)
Nitin> then the start of the sturct will also be aligned a 8 byte boundary.
That is defined by the ABI. Most ABIs define the alignment of
types as their natural alignment and propagate the largest (strictest)
alignment into aggregates. The ABI for your Sparc-based system presumably
uses that model. If you want to change the alignment of a structure
member from the default, you need to use compiler extensions.
David
More information about the Gcc
mailing list