Arm structure alignment
Shaun Jackman
shaunj@gray-interfaces.com
Fri Sep 1 17:01:00 GMT 2000
I'm porting a legacy app and need binary compatibility with the structures
written to disk.
Can I force GCC to pack *all* structures from the command line? to avoid going
through all the sources and adding __attribute__((packed)) to all the structure
definitions.
A seperate question... where exactly does the above magic string go?
I have a struct of the form...
struct mystruct {
char bytes[6];
};
which gcc is insisting on padding to 8 bytes and is causing me unlimited
problems.
What's the effect of...
struct mystruct {
char bytes[6] __attribute__((packed));
};
struct mystruct {
char bytes[6];
} __attribute__((packed));
struct mystruct {
char bytes[6] __attribute__((packed));
} __attribute__((packed));
Thanks,
Shaun
------
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