Thank you for the tip. I found the (quite easy) solution: -fpack-struct solves the problem.
Thank's and best regards. -------- Original-Nachricht -------- > Datum: Sat, 16 May 2009 17:28:24 +0200 > Von: [email protected] > An: "GCC for MSP430 - http://mspgcc.sf.net" > <[email protected]> > Betreff: [Mspgcc-users] Struct size > Hi, > > I've got a problem with msp430-gcc structure sizes / packing: > > When compiling the following code with a newer version of mspgcc (e. g. > mspgcc-20081230.exe or a topic cvs-build) the variable xaver is six byte in > memory: > > typedef struct { > struct { > unsigned a : 1; > unsigned b : 1; > unsigned c : 1; > unsigned d : 1; > unsigned e : 4; > } BIT; > unsigned char x; > unsigned int y; > } mytype; > > mytype xaver; > > int main() { > } > > When compiling it with an older version (e. g. mspgcc-20080619.exe), xaver > has only a size of four bytes. > > Can anybody explain me why? > Can I avoid packing the new way? > > Thanks for your help and best regards. > > -- > Neu: GMX FreeDSL Komplettanschluss mit DSL 6.000 Flatrate + > Telefonanschluss für nur 17,95 Euro/mtl.!* > http://dslspecial.gmx.de/freedsl-surfflat/?ac=OM.AD.PD003K11308T4569a > > ------------------------------------------------------------------------------ > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensing option that enables > unlimited royalty-free distribution of the report engine > for externally facing server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > Mspgcc-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/mspgcc-users -- Neu: GMX FreeDSL Komplettanschluss mit DSL 6.000 Flatrate + Telefonanschluss für nur 17,95 Euro/mtl.!* http://dslspecial.gmx.de/freedsl-surfflat/?ac=OM.AD.PD003K11308T4569a
