Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!uunet!microsoft!jimad From: jimad@microsoft.UUCP (Jim ADCOCK) Newsgroups: comp.std.c++ Subject: Re: Randomly ordered fields !?!? (Was: Message-ID: <56940@microsoft.UUCP> Date: 27 Aug 90 17:16:19 GMT References: <1070@lupine.NCD.COM> <259400004@inmet> Reply-To: jimad@microsoft.UUCP (Jim ADCOCK) Organization: Microsoft Corp., Redmond WA Lines: 22 In article <259400004@inmet> stt@inmet.inmet.com writes: |Re: Allowing compilers to reorder fields "at will". | |Having used a language without strict field ordering |rules, I can testify that it is a nightmare. If you |want the compiler to reorder your fields, then you |should have to indicate it explicitly, perhaps via |a "pragma" or equivalent. Otherwise, you lose |interoperability between successive versions of |the same compiler, let alone interoperability between |different compilers. Maybe or maybe not, but C++ compilers already have the right to reorder your field orderings. Or are you proposing that the rules should be changed to prevent compilers from reordering? The only restriction right now is that within a labeled section fields must be at increasing addresses. Which neither requires nor prevents compilers from changing field orderings from your expectations, but rather leaves those decisions to the sensibilities of the compiler vendor. If some future C++ compiler supported persistence and schema evolution, would you then demand a user specified field ordering?