COMMONS in C

USENET News news at awdprime.UUCP
Tue Mar 20 07:08:08 AEST 1990


In article <22944 at unix.cis.pitt.edu> rothen at 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!)



More information about the Comp.lang.c mailing list