offsetof (was: Re: Something new for C?)

Doug Gwyn gwyn at smoke.BRL.MIL
Thu Nov 17 07:07:05 AEST 1988


In article <22164 at watmath.waterloo.edu> rbutterworth at watmath.waterloo.edu (Ray Butterworth) writes:
>... for some reason the Committee chose not to make this macro
>part of the Standard even though alignof() seems to be more useful
>(to me at least) than offsetof().

As has been explained many times before, and will be explained yet again
in the third-round response document, alignment can depend on context,
so alignof(type) is not realizable in some implementations.

>And this is one more reason why "ANSI C now" still isn't good enough.

I think having a standard drafted by people who understand these issues
will be a great service to the C community.



More information about the Comp.lang.c mailing list