Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!mentor.cc.purdue.edu!pur-ee!pur-phy!sho From: sho@pur-phy (Sho Kuwamoto) Newsgroups: comp.lang.c Subject: Re: Another silly question Message-ID: <2238@pur-phy> Date: 3 May 89 07:24:42 GMT References: <2459@nmtsun.nmt.edu> <9987@claris.com> <879@twwells.uucp> <17812@cup.portal.com> Reply-To: sho@newton.physics.purdue.edu.UUCP (Sho Kuwamoto) Organization: Purdue Univ. Physics Dept., W. Lafayette, IN Lines: 18 In article <17812@cup.portal.com> Tim_CDC_Roberts@cup.portal.com writes: >If I mix two pointer types, as in > char * c; > long * ell; > return c + ell; >is this anarchy? Is it a syntax error? What is sizeof(*(c+ell))? This should be a syntax error. Even long *a, *b; return(a+b) is illegal. However, long *a, *b; return(a-b); Is legit. If a and b are pointers to different types, it is probably still a syntax error. On the other hand, I could be wrong. I got mildly crisped last time I fielded a question... -Sho