Thomas Moestl wrote: > > He's making the valid point that for: > > > > struct foo *fee; > > > > It's possible that: > > > > sizeof(struct foo) != (((char *)&fee[1]) - ((char *)&fee[0])) > > No, I do not. In fact, the opposite: > > sizeof(struct foo) = (((char *)&fee[1]) - ((char *)&fee[0])) > > _must_ always be true, since it is legal to compute the size of > storage needed for an n-element array of struct foo by using > (sizeof(struct foo) * n). > > My point was that, because of the above, any padding that might be > required between the first and last member of two struct foo's > immediately following each other must be _included_ in struct foo, > after the last element.
Reread my second to last paragraph. I'm saying the same thing that you are. In my third to last paragrap, I pointed to an example for directory entries that ensures end-pad independence (I wrote that code). -- Terry To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message