Path: utzoo!attcan!uunet!lll-winken!ames!haven!uvaarpa!hudson!astsun1.acc.Virginia.EDU!gsh7w From: gsh7w@astsun1.acc.Virginia.EDU (Greg Hennessy) Newsgroups: comp.lang.c Subject: Re: When is a cast not a cast? Message-ID: <1513@hudson.acc.virginia.edu> Date: 18 May 89 16:19:27 GMT References: <406@skye.ed.ac.uk> <10276@smoke.BRL.MIL> <2890@buengc.BU.EDU> <334.nlhp3@oracle.nl> Sender: news@hudson.acc.virginia.edu Reply-To: gsh7w@astsun1.acc.Virginia.EDU.acc.Virginia.EDU (Greg Hennessy) Organization: University of Virginia, Charlottesville Lines: 23 In article <334.nlhp3@oracle.nl> bengsig@oracle.nl (Bjorn Engsig) writes: #Pointer addition IS meaningless. Let's take an example of a 3 bit machine #with only 0, 1, 2, ... , 7 as the only addresses. Let's also declare # #char *p, *q; # #and let p==3 and q==5. Then what is p+q? Which type does it have? The #presumed answer of '8' cannot be stored in this machine. # Then why can't one say "Integer addition IS meaningless. Let's take an example of a 16 bit machine. Let's also declare int i,j; and let i == 32000 and q == 32767. Then what is I+j? Which type does it have? The presumed answer of `64767' cannot be stored in this machine. -Greg Hennessy, University of Virginia USPS Mail: Astronomy Department, Charlottesville, VA 22903-2475 USA Internet: gsh7w@virginia.edu UUCP: ...!uunet!virginia!gsh7w