Optimal structure field ordering
Doug Gwyn
gwyn at brl-smoke.ARPA
Sat Jul 9 02:40:16 AEST 1988
In article <4347 at pasteur.Berkeley.Edu> faustus at ic.Berkeley.EDU (Wayne A. Christopher) writes:
>(1) What if I write a binary data file (with structures), re-compile my
>program (not having realized that somebody installed the new compiler
>with structure optimization) and then try to read it back in?
This sort of change does occasionally occur. Gould changed their
calling sequence between two releases of UTX/32. At least one VAX
C compiler packs struct members more tightly than the original
UNIX 32V PCC. And so on. Mixing output from different compilers
has always been hazardous.
This and related issues fall into what X3J11 terms the "quality of
implementation" bin. The only constraint on such behavior lies in
its acceptability to customers. It really isn't proper for the
language standard to try to nail down such implementation-specific
details; in fact it's extremely hard to write such specifications
in a way that applies reasonably to all implementations. Thus it
is considered overspecification and is not done.
More information about the Comp.lang.c
mailing list