On Tue, 31 Dec 2002, Jim Cromie wrote:

> pardon the lack of clue I reveal here, but..
>
> on 32 bit box, a void* has 3 values which are illegal/unaligned;
>
> void* ptr;
> if (ptr & 0x00) {

ITYM if(!(ptr & 0x3))

>     /* ok */
> } else {
>     /* some exceptional situation */
> }

> is there any concievable use of this which doesnt interfere with
> legitimate bus-errors (ie existing unaligned pointer handling) ?

IMHO it's a little dodgy, besides, someone's eventually going to find a
system (toaster?) that doesn't care about alignment or aligns such that
ptr % 4 == 3 or something.

Dave
Isa. 40:31

Reply via email to