Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: sizeof a struc field Message-ID: <11110@smoke.BRL.MIL> Date: 19 Sep 89 21:02:11 GMT References: <7710@microsoft.UUCP> <11086@smoke.BRL.MIL> <131@dtoa3.dt.navy.mil> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 11 In article <131@dtoa3.dt.navy.mil> stuart@dtix.dt.navy.mil (Stuart Pearlman) writes: -In article <11086@smoke.BRL.MIL> gwyn@smoke.BRL.MIL (Doug Gwyn) writes: -:In article <7710@microsoft.UUCP> peterwu@microsoft.UUCP (Peter Wu ) writes: -:>#define SIZEGHI sizeof(((struct abc *)0)->ghi) -:No, that doesn't necessarily work. Review the interminable discussions -:about use of null pointers. -What is important is the type of sizeof's argument, and that certainly -seems well defined. Is the type of an illegal expression well defined? Perhaps it's the same as the type of one hand clapping.