Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!romp!auschs!awdprime!news From: news@awdprime.UUCP (USENET News) Newsgroups: comp.lang.c Subject: Re: COMMONS in C Message-ID: <1838@awdprime.UUCP> Date: 19 Mar 90 21:08:08 GMT References: <22944@unix.cis.pitt.edu> Reply-To: cs.utexas.edu!ibmaus!auschs!sanders!sanders (Tony Sanders) Distribution: usa Organization: contract to IBM AWD, Austin, TX Lines: 19 In article <22944@unix.cis.pitt.edu> rothen@unix.cis.pittsburgh.edu (Seth B Rothenberg) writes: >I have actually tried this on the vax and it worked. >But someone told me recently that the order of the variables in >memory is not always the same as the order of the variables in the >structure. Is this true? I don't understand why the rest of the code would depend on the order of the variables in memory. Are you sure that the order matters to the rest of the generated code??? It would be legal for a compiler to change the in memory order of structure elements (though I don't think anyone does this), as it is also legal for compilers to insert unused bytes to pad elements to fit onto memory boundries (really nasty if you write out structures on machine A and try and read them on machine B, a big no no). -- sanders The 11th commandment: "Thou shalt use lint" For every message of the day, a new improved message will arise to overcome it. Reply-To: cs.utexas.edu!ibmaus!auschs!sanders.austin.ibm.com!sanders (ugh!)