RE: unaligned accesses
>memcpy(d, s, 4) should also generate reasonable code, I would have
>thought, but actually, it doesn't... I'll check that...
I have no issue with the memcpy approach, it's just less
obvious than a simple __unaligned qualifier.
>But these are just ugly kludges, unaligned accesses should simply be
>avoided.
True, but the architecture awareness for such discipline is
not widespread. The most prevalent architecture for Linux doesn't
have an issue with unaligned accesses, so most developers
are unaware. (Yes I know the most prevalent Linux architecture
benefits greatly from aligned accesses, but unaligned ones are handled
transparently and hence ignored).
...tom
--
To UNSUBSCRIBE, email to debian-alpha-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: