Eric said:
What is this?That looks like either someone's poor coding or someone's poor
( char * ) &( ( struct aStruct * ) 0 )
pasting for an implementation of offsetof() from stddef.h. The
(char *) leads me to think that there's plenty of missing context,
so post the surrounding code, and we'll be happy to jerk ourselves
off analyzing the code for you and telling you why it won't work on
the control system for your Tomahawk missile.
For what it's worth,
((size_t) &((TYPE *)0)->MEMBER)
is a common implementation of offsetof() on systems that allow it.
Yours,
Han from China