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: Structure Alignment Bug in Sparc.


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


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