Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!spool.mu.edu!rex!ukma!seismo!dimacs.rutgers.edu!rutgers!cmcl2!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: finding offset of a member in C structures Message-ID: <16210@smoke.brl.mil> Date: 21 May 91 02:45:59 GMT Article-I.D.: smoke.16210 References: <1276@unisql.UUCP> <16194@smoke.brl.mil> <1991May20.201857.635@lynx.CS.ORST.EDU> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 13 In article <1991May20.201857.635@lynx.CS.ORST.EDU> osbornk@mist.CS.ORST.EDU (Kasey S. Osborn) writes: -In article <16194@smoke.brl.mil> gwyn@smoke.brl.mil (Doug Gwyn) writes: -|Standard C provides an offsetof() macro, ... -Really? I can't find a reference to offsetof() in any of my C references. -In fact, GNU CC does not preprocess offsetof() and instead treats it as an -external reference. Are you sure this is standard? Jesus, what a stupid question. -What compiler are you using? What is the syntax of offsetof()? I've -been trying to find a palatable solution to this problem with no luck. Why don't you try looking in the index of the C standard?