finding offset of a member in C structures

Doug Gwyn gwyn at smoke.brl.mil
Tue May 21 12:45:59 AEST 1991


In article <1991May20.201857.635 at lynx.CS.ORST.EDU> osbornk at mist.CS.ORST.EDU (Kasey S. Osborn) writes:
-In article <16194 at smoke.brl.mil> gwyn at 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?



More information about the Comp.lang.c mailing list