Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!uakari.primate.wisc.edu!aplcen!boingo.med.jhu.edu!haven!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: increment casted void pointer -- ANSI? Message-ID: <15633@smoke.brl.mil> Date: 30 Mar 91 14:00:53 GMT References: <3492@inews.intel.com> <15619@smoke.brl.mil> <3548@inews.intel.com> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 19 In article <3548@inews.intel.com> bhoughto@pima.intel.com (Blair P. Houghton) writes: > x.i = 4; > y = &x; > z = y->f; >It seems to me that this is nowhere permitted to return >the bits of `4' in the float-value, nor prohibited from it. >(I doubt very much that it would return `4.0'). Sure it'd >be a cute thing to have around, but can one _rely_ on it >and claim portability re X3.159-1989? No, we were talking about the other way around, and I wasn't claiming portability, just a method that had to be accepted by a conforming implementation, although due to variation in the ways that implementations represent values it would be expecting too much to ask for portability here. Certainly one should not be surprised to get an "invalid operand" exception when attempting the above, as the bit pattern may not be a valid floating-point representation.