Newsgroups: comp.lang.c
Path: utzoo!henry
From: henry@utzoo.uucp (Henry Spencer)
Subject: Re: COMMONS in C
Message-ID: <1990Mar19.213645.1962@utzoo.uucp>
Organization: U of Toronto Zoology
References: <22944@unix.cis.pitt.edu>
Date: Mon, 19 Mar 90 21:36:45 GMT

In article <22944@unix.cis.pitt.edu> rothen@unix.cis.pittsburgh.edu (Seth B Rothenberg) writes:
>... 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?

Both K&R1 and ANSI C say the order must be preserved.  There are probably
compilers that don't do this, however.

>Based on the way structures can be initialized, I think the
>person I spoke with is mistaken.

Structure initialization has no bearing on the question, since the compiler
need only rearrange the order of elements in the initializer to match.
-- 
MSDOS, abbrev:  Maybe SomeDay |     Henry Spencer at U of Toronto Zoology
an Operating System.          | uunet!attcan!utzoo!henry henry@zoo.toronto.edu
