On Gwe, 2006-01-06 at 12:23 -0800, Pete Zaitcev wrote:
> or it is just a bug which didn't reach gcc people yet. It is dysfunctional
> to have structures padded in this way. On all other platforms they are
> only padded if they include a member which is bigger than the char.

Not true. Maybe for the other platforms we support today but a large
number of compilers have used 2 or 4 byte alignment for all object
starts, especially little endian word addressed systems. I suspect
ucLinux as it hits bigger DSP oriented devices will find more examples.

Russell is right on this one. If you want an object to be aligned as you
lay it out use attribute packed either on the struct or the relevant
fields.


Alan



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to