The offsetof macro

Doug Gwyn gwyn at smoke.ARPA
Wed Aug 31 20:47:15 AEST 1988


In article <16490006 at hpcllca.HP.COM> walter at hpcllca.HP.COM (Walter Murray) writes:
>So what is a valid way to define offsetof?

There is no portable way to #define an offsetof() macro in C.
The usual method you already know will nonetheless work on a
large number of implementations.  Others may have to use a
compiler intrinsic for this.



More information about the Comp.std.c mailing list