Justin, > On Tue, May 23, 2006 at 10:07:57PM +0200, Michael Kerrisk wrote: > > > \fBoffsetof\fP() is a macro provided to compute the offset of a given > > > element within a structure. The ordering within memory of a C > > > structure is undefined, as is its size; compilers are allowed to > > > reorder and pad structures. > > ^^^^^^^ > > Is that really true? I can't recall a case where I have ever seen > > that, nor do I recall some such statement in the standards. > > Please tell me more.
> I couldn't find anything to back this up, so you might be right.. Umm -- where did the words come from then? > One reason such things aren't as noticable is because most network > protocols put the members in decreasing order of size, in an attempt > to satisty the requirements for alignment and such, and inhibit any > such compiler-specific :) things. ? Low level network protocols have no idea about the semantics of bytes from higher layers. They won't do any reordering. Cheers, Michael -- Michael Kerrisk maintainer of Linux man pages Sections 2, 3, 4, 5, and 7 Want to help with man page maintenance? Grab the latest tarball at ftp://ftp.win.tue.nl/pub/linux-local/manpages/, read the HOWTOHELP file and grep the source files for 'FIXME'. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

