Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Jan 1995 09:34:59 -0500 (EST)
From:      John Capo <jc@irbs.com>
To:        mtaylor@gateway.cybernet.com (Mark J. Taylor)
Cc:        freebsd-hackers@freefall.cdrom.com (freebsd-hackers)
Subject:   Re: disable structure packing with gcc?
Message-ID:  <199501301434.JAA26994@irbs.com>
In-Reply-To: <v01510108ab521964e060@[192.245.33.12]> from "Mark J. Taylor" at Jan 29, 95 11:24:41 pm

next in thread | previous in thread | raw e-mail | index | archive | help
Mark J. Taylor writes:
> 
> 
> 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)?
> 

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.

John Capo



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199501301434.JAA26994>