Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!samsung!ginosko!aplcen!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: how about sizeof(((type *)1)->member) ? Message-ID: <11429@smoke.BRL.MIL> Date: 27 Oct 89 18:41:14 GMT References: <7710@microsoft.UUCP> <680011@hpmwjaa.HP.COM> <11404@smoke.BRL.MIL> <10767@csli.Stanford.EDU> <1469@crdos1.crd.ge.COM> <1989Oct27.141015.20578@talos.uucp> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 10 In article <1989Oct27.141015.20578@talos.uucp> kjones@talos.uu.net writes: >If sizeof(((type *)0)->member) is forbidden, then is >sizeof(((type *)1)->member) forbidden as well, in pANS >conforming programs? The latter is not guaranteed to work in all implementations, due to variation in addressing architectures (and memory "models"). For example, "type" objects may require quadword alignment, and the compiler can easily tell that the address constant value 1 does not satisfy that constraint.