Path: utzoo!mnetor!uunet!steinmetz!davidsen From: davidsen@steinmetz.steinmetz.ge.com (William E. Davidsen Jr) Newsgroups: comp.lang.c Subject: Re: Why NULL is 0 Message-ID: <10265@steinmetz.steinmetz.ge.com> Date: 5 Apr 88 20:53:40 GMT References: <2550049@hpisod2.HP.COM> <7412@brl-smoke.ARPA> <3351@chinet.UUCP> <10229@steinmetz.steinmetz.ge.com> <48209@sun.uucp> Reply-To: davidsen@crdos1.UUCP (bill davidsen) Organization: General Electric CRD, Schenectady, NY Lines: 22 Although the size of int and pointers may be the same on SPARC, my impression from limited testing is that the machine can't access unalligned data, and that the compiler doesn't catch this. Thus if I do something dumb like: char m[5]; a = foo(&m[0], &m[1]); where: foo(x,y) int *x, *y; that at least one of the pointers will not be on a 4 byte boundary, and therefore will not work as expected by people who use a VAX, 68000, 80x86, etc. This was the reason for my caution about SPARC. If this is not the case, please correct me, as my access to a Sun4 was limited, and other things might have caused the problem. -- bill davidsen (wedu@ge-crd.arpa) {uunet | philabs | seismo}!steinmetz!crdos1!davidsen "Stupidity, like virtue, is its own reward" -me