Hi, Apologize for the delayed post; was away on a small vacation. Thanks, everyone, for your help. I tried rearranging the structure members and converting the accesses to structure members, wherever possible, into byte access. These changes really did help; however, I feel the easiest way out in such cases, if excess and slightly inefficient object code is not a major problem, is using the '-mstrict-align' gcc parameter, as suggested by Hardy. Thanks again.
Regards, Sudhakar " This e-mail, and any attachments thereto, are intended only for use by the addressee(s) named herein and contain Honeywell confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying which amounts to misappropriation of this e-mail and any attachments thereto, is strictly prohibited. If you have received this e-mail in error, please immediately notify me and permanently delete the original and any copy of any e-mail and any printout thereof." -----Original Message----- From: [email protected] [mailto:[email protected]]on Behalf Of Hardy Griech Sent: Wednesday, January 05, 2005 00:10 To: [email protected] Subject: Re: [Mspgcc-users] Problem with packed structures.. Venkata, Bulusu (IE10) wrote: > Hi, > I'm having problems with packed structures. Given below is a sample > code("test.c") which uses a packed structure: > > #include <stdio.h> > typedef struct { > char a; > int b; > }__attribute__((packed)) unaligned_struct; using '-mstrict-align' as a gcc parameter should do the trick. Hardy ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ Mspgcc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mspgcc-users
