Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!cornell!uw-beaver!mit-eddie!killer!pollux!dalsqnt!rpp386!jfh From: jfh@rpp386.UUCP (John F. Haugh II) Newsgroups: comp.lang.c Subject: Re: Optimal structure field ordering Message-ID: <3747@rpp386.UUCP> Date: 9 Jul 88 00:32:46 GMT References: <163@navtech.uucp> <806@garth.UUCP> <254@obie.UUCP> <3459@rpp386.UUCP> <5233@ihlpf.ATT.COM> Reply-To: jfh@rpp386.UUCP (The Beach Bum) Organization: Big "D" Home for Wayward Hackers Lines: 27 In article <5233@ihlpf.ATT.COM> nevin1@ihlpf.UUCP (00704a-Liber,N.J.) writes: >In article <3459@rpp386.UUCP> jfh@rpp386.UUCP (The Beach Bum) writes: >>it could be serious for any language to not specify how it rearranges >>structures. it could make it impossible for separate compilation to >>work, period. > >Not quite true. As long as the compiler internally arranges the fields in >a structure the same way, no problems occur. There is no need for you, the >user of a compiler, to know what order fields are stored in, as long as the >compiler is self-consistent (unless you are doing something like a block >move into a structure). provided there exists exactly one compiler in the entire universe. for without the assurance, via an agreed upon or written standard, that the structures are arranged in a common fashion, no two ``self consistent'' compilers are neccessarily going to produce the same structure ordering. and therein lies the beauty of a standard. while separate compilation may not be such a huge issue, using multiple compilers on a single machine, is. - john. -- John F. Haugh II +--------- Cute Chocolate Quote --------- HASA, "S" Division | "USENET should not be confused with UUCP: killer!rpp386!jfh | something that matters, like CHOCOLATE" DOMAIN: jfh@rpp386.uucp | -- with my apologizes