> "The members of a structure have addresses increasing in the order of their
> declaration"
The following is quoted from the X3J11 ANSI C "Rationale for American National
Standard for Information Sytems - Programming Language - C":
Section 3.5.2.1 Structure and union specifiers
" The layout of structures is determined only to a limited extent:
* no hole may occur at the beginning;
* members occupy increasing storage addresses; and
* if necessary, a hole is placed on the end to make the structure big enough to
pack tightly into arrays and maintain proper alignment."
The second bullet specifies only that structure members as a group occur
increasing storage addresses -- it does not specify in what order the
individual members must occur.
At the Army Research Lab we have used several compilers, such as Software
Development Systems 680x0 series, that have compiler flags which pack structure
elements to optimize either for space (aggregating similar types), or for speed
(liberal use of aligment holes).
Robert