[U-Boot-Users] struct NS16550 {...} __attribute__ ((packed)) at ns16550.h

Arthur Shipkowski art at videon-central.com
Mon Apr 25 16:06:20 CEST 2005


> If this is really true, then there is either bug in GCC or in the code.
> If I code a 32 bit access the compiler must not use any other accesses.

If you use __attribute__ ((packed)), you are telling the compiler you have
an unaligned data structure (e.g. longs not by-4 aligned).  Therefore, GCC
will always reassemble the 32-bit value from byte accesses.

Art Shipkowski
Videon Central Software Engineer
(814)235-1111 x307
art at videon-central.com







More information about the U-Boot mailing list