Path: utzoo!attcan!uunet!ginosko!brutus.cs.uiuc.edu!psuvax1!rutgers!cbmvax!ag From: ag@cbmvax.UUCP (Keith Gabryelski) Newsgroups: comp.lang.c Subject: Re: sizeof a struc field Message-ID: <8241@cbmvax.UUCP> Date: 23 Oct 89 02:12:47 GMT References: <11372@smoke.BRL.MIL> Reply-To: ag@cbmvax.UUCP (Keith Gabryelski) Organization: Commodore Technology, West Chester, PA Lines: 20 I didn't see this come up anywhere... > sizeof(((type *)0)->member) /* cited construct */ Is there a problem with declaring the structure pointer as an extern and then doing the sizeof thang? As: extern struct foo *Foo; sizeof Foo->member This requires no data allocation which was the original gripe, eh? Pax, Keith Ps, This casting NULL to some structure pointer then grabbing a member from it FOR ANY REASON seems dubious, at best, to me. $.02. -- "It took no computation to dance to the rock 'n roll station" -- VU ag@cbmvax.commodore.com Keith M. Gabryelski ...!uunet!cbmvax!ag