Re: FW: [iPAQ] skiff tools question

From: Nicolas Pitre <nico.a.t.cam.org>
Date: Thu Sep 14 2000 - 21:01:28 EDT

On Thu, 14 Sep 2000, Gordon McNutt wrote:

> George France wrote:
>
> > Correction:
> >
> > struct foo_t { u16 x; } __attribute__ ((packed));
> >
> > Best Regards,
> >
> > --George
>
> I hope it's something that simple. But the following example makes me
> worry that it is not, as this example does not use structs:
>
> u8 buf[4];
> u16 *a;
> a = &buf[1];
> *a = 4;

This is the perfect example of what you can't do on any ARM processor (nor
Alpha nor IA-64, etc.) because alignment is important. Many applications
were written with i386 CPUs in mind where alignment isn't an issue, but
this is bad practice and not portable.

Nicolas
Received on Thu Sep 14 18:00:00 2000

This archive was generated by hypermail 2.1.8 : Tue May 04 2004 - 09:43:42 EDT