offsets in structures.

Ron Natalie <ron> ron at brl-tgr.ARPA
Thu Oct 18 05:43:47 AEST 1984


>    The expression can be made portable, at least under UNIX, by
> having
> 	extern end;
> somewhere in a header file, and then replacing "0" in the expression by
> "&end".  For maximum portability, of course, use a real object of type
> struct foo in the expression.

FOO! WRONG!  On non-byte addressed machines this isn't guaranteed to work
either.

-Ron



More information about the Comp.lang.c mailing list