Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!uunet!math.fu-berlin.de!uniol!unido!rwthinf!marvin.e17.physik.tu-muenchen.de!berg From: berg@marvin.e17.physik.tu-muenchen.de (Stephen R. van den Berg) Newsgroups: comp.lang.c Subject: Re: increment casted void pointer -- ANSI? Message-ID: <4145@rwthinf.UUCP> Date: 13 Mar 91 13:56:07 GMT References: <4142@rwthinf.UUCP> <1991Mar8.165300.11692@zoo.toronto.edu> <166@tdatirv.UUCP> Sender: news@rwthinf.UUCP Lines: 15 Stanley Friesen writes: >To pretend a variable has a different type utter the following magic >incantations: >b = *++ *(char **)&p; Nice. Could be usefull to know this (some time). But, in my original application (not the example I showed, it was a library replacement of memmove) I use register void pointers, to which the above trick cannot be applied (sigh). -- Sincerely, berg@marvin.e17.physik.tu-muenchen.de Stephen R. van den Berg. "I code it in 5 min, optimize it in 90 min, because it's so well optimized: it runs in only 5 min. Actually, most of the time I optimize programs."