Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uunet!crdgw1!underdog!volpe From: volpe@underdog.crd.ge.com (Christopher R Volpe) Newsgroups: comp.lang.c Subject: Double typecast in "offset" macro??? Message-ID: <8242@crdgw1.crd.ge.com> Date: 6 Jun 90 14:27:24 GMT Sender: news@crdgw1.crd.ge.com Distribution: usa Organization: General Electric Corporate R&D Center Lines: 13 In the "Answers to Frequently Asked Questions" document, the structure offset macro is defined as follows: #define offset(type,mem) ((size_t) (char *)&(((type *)0)->mem)) Now, the "&" operator yields a pointer to the type of "mem". If you want to convert it to be of type "size_t", why must it first be converted to "char *" ?? What's wrong with the following: #define offset(type,mem) ((size_t) &(((type *)0)->mem)) Thanks, Chris