Structure alignment with GCC
Matthew R Wette
mwette@grover.jpl.nasa.gov
Fri Aug 11 13:06:00 GMT 2000
In gcc you can do
struct s x __attribute__ ((aligned (16))) = 0;
and this will align x on a 16byte boundary, if that helps.
Christopher Bahns writes ...
> I don't think I'm concerned about structure "packing", am I? I have
> specifically been looking for documentation/options related to
> structure "alignment". I don't think I have any issues with how the
> compiler places structure fields in relation to other fields in the
> same structure. My concern is the placement of the structure itself
> in relation to what comes before it, which, as far as I can tell, is
> not related to whether or how the fields in the structure are
> packed. Naturally if someone thinks that messing around with
> structure packing might affect my alignment problem, I'd appreciate
> the info.
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
More information about the crossgcc
mailing list