Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site watmath.UUCP Path: utzoo!watmath!kpmartin From: kpmartin@watmath.UUCP (Kevin Martin) Newsgroups: net.lang.c Subject: struct element orderin vs. alignment. Message-ID: <10599@watmath.UUCP> Date: Sat, 5-Jan-85 02:58:00 EST Article-I.D.: watmath.10599 Posted: Sat Jan 5 02:58:00 1985 Date-Received: Sat, 5-Jan-85 04:37:09 EST References: <1265@orca.UUCP><136@suadb.UUCP> Reply-To: kpmartin@watmath.UUCP (Kevin Martin) Organization: U of Waterloo, Ontario Lines: 12 Summary: There seem to be people who are saying, effectively, if the language user doesn't care about struct element alignment, he/she also deson't care about element ordering (you care about alignment for device registers, which are machine dependant already, right?). The problem is, that this isn't true. There are many programs which believe that two structures with the same initial set of elements have the same ordering for those elements. This prevents the compiler from (by default) re-ordering the elements. In other words, it is possible for the programmer to care about the order, but not the alignment, of struct fields. Kevin Martin, UofW Software Development Group