This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to stop gcc padding structs???
On Mon, Jan 29, 2001 at 01:13:52PM -0500, Michael Meissner wrote:
> Well there is the original Alpha, which had to use hacks to get
> around the problem of not having byte/16-bit access
> instructions at the device layer (and multiple instructions to
> pack/unpack the values).
>
> What I thought you meant was something like:
>
> int i = *(int *)((char *p) + 14);
>
> Ie, unaligned word access (the x86 always allows unaligned
> accesses albeit at a performance penalty, as do the high-end
> powerpc's in big endian mode).
Yup. I ran into the unalinged word problem years ago on a SPARC
processor. I don't know if the newer SPARCs allows unalinged
words or not.
--
Grant Edwards
grante@visi.com