This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more infromation.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
I compiled the following snippet with
-mstructure-size-boundary=8
Unfortunately, sizeof( s) and sizeof( s0) both report 16 (should be 14).
Through inspection with GCC, there's no padding between the members, so I
assume the padding is being added to the end.
I thought this is what -ms.s.b. was supposed to prevent.
Help?
typedef struct {
int src;
int dst;
char mbz;
char protocol;
short length;
short checksum;
} s;
int
main()
{
s s0;
int i;
i = sizeof( s);
i = sizeof( s0);
return 0;
}
--
host=i686-pc-linux-gnu
target=arm-elf
--
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
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |