Path: utzoo!attcan!uunet!decwrl!shelby!msi-s0.msi.umn.edu!cs.umn.edu!ux.acs!hopper From: hopper@ux.acs.umn.edu (hopper) Newsgroups: comp.std.c++ Subject: Re: Packing, Ordering, and Rearranging Message-ID: <2321@ux.acs.umn.edu> Date: 2 Oct 90 00:00:25 GMT References: <1407@lupine.NCD.COM> <2218@ux.acs.umn.edu> <57467@microsoft.UUCP> <1990Sep21.130531.7437@zorch.SF-Bay.ORG> <57650@microsoft.UUCP> <57681@microsoft.UUCP> <2311@ux.acs.umn.edu> <57858@microsoft.UUCP> Reply-To: hopper@ux.acs.umn.edu (Eric Hopper) Organization: Omnifarious Software Lines: 39 In article <57858@microsoft.UUCP> jimad@microsoft.UUCP (Jim ADCOCK) writes: >Reading the ANSI-C spec, I do not see any promises of the "precise" control >being referred to. I see instead, great latitude provided to compiler >writers in order to allow efficient code be generated on a given machine. >Perhaps you can clarify what constraints provided by the ANSI-C spec meet >your ideas of "precise control" ? I can't see any references to that, the point is, is that you can do it. A given structure member IS garunteed to come after a previous strcture member, and most compiler vendors tell you the sizes of their various fields, and their padding rules. Wala! You can declare structures that will be packed in a particular fashion. The argument that this is non-portable is silly. Of course it isn't portable. There are occaisionally VERY good reasons to do it though, and the issue that doing so isn't portable becomes moot. If strange structure packing were stuck in C++ it may not be possible anymore to do these neccesary, non-portable things. If C++ becomes a language in which you can't do things, it will become useless. Have fun, UUCP: rutgers!umn-cs!ux.acs.umn.edu!hopper (Eric Hopper) __ /) /**********************/ / ') // * I went insane to * / / ______ ____ o // __. __ o ____. . _ * preserve my sanity * (__/ / / / <_/ / <_<__//__(_/|_/ (_<_(_) (_/_/_)_ * for later. * Internet: /> * -- Ford Prefect * hopper@ux.acs.umn.edu /**********************/ Sorry Kent. I have no control over my news posting software. I'll send a note to the sysadmin though. -- -- Nils_McCarthy mtymp01@ux.acs.umn.edu rutgers!umn-cs!ux.acs.umn.edu!mtymp01 "The wonders of modern technology..." :-) :-) :-)