Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!novavax!twwells!bill From: bill@twwells.uucp (T. William Wells) Newsgroups: comp.lang.c Subject: Re: arithmetic on void pointers Message-ID: <754@twwells.uucp> Date: 7 Mar 89 05:14:00 GMT References: <1527@ncar.ucar.edu> Reply-To: bill@twwells.UUCP (T. William Wells) Organization: None, Ft. Lauderdale Lines: 17 Summary: Expires: Sender: Followup-To: Distribution: Keywords: In article <1527@ncar.ucar.edu> russ@groucho.UUCP (Russ Rew) writes: : GNU C supports arithmetic on void pointers, but the manual implies : that this is an extension to the C language. I could find no : prohibition on arithmetic on void pointers in K&R second edition. : What does the latest dpANS document say? Is it legal to increment a : variable of type void* ? When the dpANS talks about pointer arithmetic, it speaks of pointers to an object type. Void is an incomplete type, a pointer to void is thus not a pointer to an object type, so a void pointer can't be used in pointer arithmetic. --- Bill { uunet | novavax } !twwells!bill (BTW, I'm going to be looking for a new job sometime in the next few months. If you know of a good one, do send me e-mail.)