Quoting Ben Pfaff (pfaffben@msu.edu):
> ANSI C89 and C99 prohibit compilers from reordering structure
> members. Compilers are allowed to insert padding between members
> and following the last member, but that's all they're allowed to
> do.
>
> Thus, it would be a big mistake for gcc to reorder struct members
> by default, and probably cause problems for lots of code, not
> just for the kernel.
>From my days of playing with the X11 sources, I recall there were places where
non-reordering of struct elements was a specific requirement. This would
have been (ahem) nearly 10 years ago, though, and things may since have
changed.
James
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Mon Jun 26 2000 - 21:00:05 EST