From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,9af04b2baa5a026a,start X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2003-03-19 16:36:59 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: marc.gibian@acm.org (Marc S. Gibian) Newsgroups: comp.unix.tru64 Subject: Data structure alignment question Date: 19 Mar 2003 16:36:58 -0800 Organization: http://groups.google.com/ Message-ID: <8df11a0.0303191636.389f8f0c@posting.google.com> NNTP-Posting-Host: 209.20.248.219 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1048120619 4300 127.0.0.1 (20 Mar 2003 00:36:59 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 20 Mar 2003 00:36:59 GMT Xref: archiver1.google.com comp.unix.tru64:9738 I am porting a program that runs on a number of other Unix/Linux platforms to Tru64 5.1, GCC 3.2.2. This program interchanges messages via sockets with other systems. Thus, the data alignment in structures/classes is critical. To my surprise, I find that my data is begin laid out more compactly than on the other platforms. It seems like there must be a pragma or other mechanism within GCC that would allow me to instruct the compiler to align the data on long word (32 bit) boundries. If not, I'm going to be stuck adding pad fields to a non-trival set of structures. Thanks in advance for your help, Marc