arm-coff-gcc: -fpack-struct and non-word-aligned ints?

Richard Earnshaw
Mon Jul 5 13:18:00 GMT 2004

On Mon, 2004-07-05 at 14:13, Toralf Lund wrote:

> OK. I also found out why I thought it sometimes worked; in fact I didn't 
> take the address of a basic type in those cases, but of the struct 
> itself instead. In other words, in my above example
> struct somestruct *ptr=&value;
> ptr->b=-100;
> would probably do the right thing. I'm I right in assuming that this 
> will always be allowed?

Yes, that should work.  You can have pointers to structs that contain
unaligned members and references to those members will work as
expected.  You just can't isolate the unaligned member from its
containing structure.


Want more information?  See the CrossGCC FAQ,
Want to unsubscribe? Send a note to

More information about the crossgcc mailing list