Re: gcc structures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/09/2013 09:57 AM, David Brown wrote:
> I'm not even sure if it is
> required to keep the struct elements in the same order

It is.  6.7.2.1:

    Each non-bit-field member of a structure or union object is
    aligned in an implementation-defined manner appropriate to its
    type. Within a structure object, the non-bit-field members and the
    units in which bit-fields reside have addresses that increase in
    the order in which they are declared.

Andrew.




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux