Re: C programming on ARM



On 2008-01-31, Wilco Dijkstra <Wilco_dot_Dijkstra@xxxxxxxxxxxx> wrote:

"Grant Edwards" <grante@xxxxxxxx> wrote in message news:13q21msqkij3dbb@xxxxxxxxxxxxxxxxxxxxx
On 2008-01-30, Wilco Dijkstra <Wilco_dot_Dijkstra@xxxxxxxxxxxx> wrote:

Actually most architectures are byte addressable, including ARM,

True, but many of them (ARM, SPARC, MSP430, ...) have alignment
requirements for objects larger than 1 byte in size.

Byte addressability refers to the smallest unit of
addressability, not to the coursest.

I know.

so casting pointers just works.

I think the disconnect is in what you meant by "just works". We
assumed you meant it resulted in a pointer that could be
dereferences. Apparently you meant that it could be cast to
someother type, then cast back to the original type and result
in the same pointer?

My point was that the bitpatterns of all pointer types are the
same for all addresses in the address space.

I see. I didn't recognize that point when it was spelled
"casting just works".

--
Grant Edwards grante Yow! Oh, I get it!!
at "The BEACH goes on", huh,
visi.com SONNY??
.