Article View: comp.std.c++
Article #369Re: Packing, Ordering, and Rearranging
From: Ron Guilmette
Date: Sat, 18 Aug 1990 08:10
Date: Sat, 18 Aug 1990 08:10
23 lines
1530 bytes
1530 bytes
In article <195@xstor.UUCP> iverson@xstor.UUCP (Tim Iverson) writes: <Both packing and ordering are highly desirable for the simple reason that <as the language (C/C++) stands now, it cannot deal *transparently* with the <real world. This is due solely to the lack of rigor in the specification <for the definition of a struct - the compiler is allowed too much latitude <in the physical layout of a struct. This is *not* true in C! We lost something valuable on our way to C++. <If the language had constructs for specifying such things as packing and <ordering (bit, word, etc.), it could deal transparently with structures <created outside of its own venue and should result in code that is <both cleaner and more portable. You can definitely specify what you want the exact layout of a struct to be in C and have it be obeyed and have it be portable. People do it all the time. Now if only this were possible in C++. :-( -- // Ron Guilmette - C++ Entomologist // Internet: rfg@ncd.com uucp: ...uunet!lupine!rfg // Motto: If it sticks, force it. If it breaks, it needed replacing anyway.
Technical Details
Message-ID:
<1233@lupine.NCD.COM>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uunet!lupine!rfgReferences:
<1030@lupine.NCD.COM> <56637@microsoft.UUCP> <195@xstor.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uunet!lupine!rfg From: rfg@NCD.COM (Ron Guilmette) Newsgroups: comp.std.c++ Subject: Re: Packing, Ordering, and Rearranging Message-ID: <1233@lupine.NCD.COM> Date: 18 Aug 90 08:10:39 GMT References: <1030@lupine.NCD.COM> <56637@microsoft.UUCP> <195@xstor.UUCP> Organization: Network Computing Devices, Inc., Mt. View, CA Lines: 23