[comp.std.c] offsetof: what sort of structure-members are allowed

ajmyrvold@violet.waterloo.edu (Alan Myrvold) (10/21/89)

I hope that someone could clarify my fuzzification. Consider
the structure :

struct S {
   union {
      long i;
      struct {int i; int j; } b;
   } u;
} s;

According to the draft ANSI standard, can the second argument of
offsetof be as complicated as I like, e.g. is

   offsetof(struct S,u.b.j)               allowed ??? always ???

-------------------------------------------------------------------
Alan Myrvold     ajmyrvold@violet.waterloo.edu
-------------------------------------------------------------------