actually, it gets worse. i looked up the stuff for ARM, and it was much
as i expected, but they also pointed out another problem, obvious in retrospect.
you say you want structure assignments to work, or at least not
fail. fair enough, but what about this:

        S s;
        int *p = &s.c;
        *p = 1;
        int x = *p;

the point is that in general given an int*, there's no way to know that
the target is misaligned. ARM thoughtfully provides a __packed attribute,
as in
        __packed int *p;
and then an appropriate sequence of byte-by-byte loads (or stores) will be
used to access it, but a normal int* will produce an alignment trap.

Reply via email to