Date: Tue, 31 Jan 1995 07:30:22 +1100 From: Bruce Evans <bde@zeta.org.au> To: jc@irbs.com, mtaylor@gateway.cybernet.com Cc: freebsd-hackers@freefall.cdrom.com Subject: Re: disable structure packing with gcc? Message-ID: <199501302030.HAA09887@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>> I'm writing a byte-swapping routine for structures in gcc 2.4.5 (FreeBSD >> 1.1.5.1). gcc insists on packing structures, and I do not fully understand >> the packing method it uses. >> >> How can I turn off structure packing (to get to single byte alignment)? s/packing/padding/. >gcc 2.X supports #pragma pack() directives if it is compiled with >-DHANDLE_SYSV_PRAGMA. I have several cross-compilers with this option >enabled and they DTRT. gcc.2.[4-5] supports __attribute__ ((packed)) declarations in all configurations. This feature is even more unportable than #praga pack. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199501302030.HAA09887>