From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,6a9cdec8faa14c49,start X-Google-Attributes: gid111c93,public From: ponion@catbert.alien.bt.co.uk (Peter Onion) Subject: Structure alignment probs in gcc between Alpha & Intel Date: 1999/01/27 Message-ID: <78mpiv$7p9$1@pheidippides.axion.bt.co.uk>#1/1 X-Deja-AN: 437466805 Content-Type: text/plain; charset=us-ascii Organization: BT Labs, Martlesham Heath, Ipswich, UK Mime-Version: 1.0 Newsgroups: comp.os.linux.alpha I'm having a problem porting some code from Intel to Alpha. There are two parts to the code (kernel & user). The problem is that the kernel and user parts use differnet structure definitions to access the data that are passed between them, and while gcc on intel produces the same memory layout for these different structres on the alpha gcc aligns things differently thus causing the fields to be accessed at the wrong offsets in the buffers. I seem to remember someone telling me that there is a switch or directive for gcc that stops this problem, but I can't remember who told me (or what they told me :-( ). Thanks Peter Onion.