Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: what C needs Message-ID: <6926@brl-smoke.ARPA> Date: 6 Jan 88 00:52:29 GMT References: <8712241909.AA03710@decwrl.dec.com> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 17 In article <8712241909.AA03710@decwrl.dec.com> devine@cookie.dec.com (Bob Devine) writes: >When writing code that requires control of alignment or location, >I find myself using a char array in which I place the members or >even using unions inside the structure to "force" alignment and >placement. This is much more of a problem -- for inter-exchange or >portability -- than is 'noalias'. If you're under the impression that a simple, efficient mechanism exists or could feasibly be made to exist for "rolling in" raw binary data obtained from another system, you're sadly mistaken. I've had to deal with this many times, and it would not have helped much to have had "packed" data. The problems are more pervasive than that. It would perhaps be of some use on the same system, to conform to externally-imposed formats, but it isn't usually much harder to perform I/O for each contiguous piece of the external data than to try to roll a whole record at a time in or out.