Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!wuarchive!udel!haven!ncifcrf!lhc!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: increment casted void pointer -- ANSI? Message-ID: <15589@smoke.brl.mil> Date: 26 Mar 91 22:22:11 GMT References: <4142@rwthinf.UUCP> <1991Mar8.165300.11692@zoo.toronto.edu> <288@nazgul.UUCP> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 9 In article <288@nazgul.UUCP> bright@nazgul.UUCP (Walter Bright) writes: -In article <1991Mar8.165300.11692@zoo.toronto.edu> henry@zoo.toronto.edu (Henry Spencer) writes: -/There is no way to say "pretend this variable has a different type" in C. -/Casts are conversions, not "view this bit pattern differently" operators -The usual to do a 'type paint', which is to change the type of an object -without changing the bit pattern, is to: - *(newtype *)&(object) A strictly conforming method is to use a union type.