Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!olivea!oliveb!amdahl!nw From: nw@uts.amdahl.com (Neal Weidenhofer) Newsgroups: comp.lang.c Subject: Re: increment casted void pointer -- ANSI? Summary: I don't think the standard requires this. Message-ID: <718q01zZ4fNC00@amdahl.uts.amdahl.com> Date: 2 Apr 91 01:54:16 GMT References: <288@nazgul.UUCP> <15589@smoke.brl.mil> <3492@inews.intel.com> <15619@smoke.brl.mil> Organization: Amdahl Corporation, Sunnyvale CA Lines: 30 In article <15619@smoke.brl.mil>, gwyn@smoke.brl.mil (Doug Gwyn) writes: > Sure it "overlaps", or acts as if it did. A conforming implementation > that, e.g. stores floating-point data in a different address space from > integer data may have to jump through hoops if it wishes to make the > aliasing of the representations actually work. However, such a program > would have to be successfully translated, it just may not work right (in > which case the fake pointer business would probably malfunction too). I can't find any such requirement in X3.159-1989. It says in Sec.3.3.2.3. "...if a member of a union object is accessed after a value has been stored in a different member of the object, the behavior is implementation-defined." I know we all discussed support for type punning using unions, but it doesn't seem to be required. The footnote clearly indicates that we intended it to work but footnotes are, alas, not a part of the standard. So, as far as I can see, no hoop jumping is required if the implementation writers/distributors document the fact. It seems to be another quality-of-implementation issue. The opinions expressed above are mine (but I'm willing to share.) Regards, And while the future's Neal Weidenhofer there for anyone nw@amdahl.uts.amdahl.com To change, still you Amdahl Corporation know it seems P. O. Box 3470 It would be easier sometimes 1250 E. Arques Ave. (M/S 316) to change the past. Sunnyvale, CA 94088-3470 (408)737-5007